Skip to content

Rollup of 8 pull requests #45207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bb74c20
Inline eq_slice into str::eq
leoyvens Oct 3, 2017
47fc913
Update the `jobserver` crate
alexcrichton Oct 5, 2017
e6728ec
fix documentation typo
camsteffen Oct 8, 2017
a263a78
Fix PEP8 style issues in bootstrap code
johnthagen Oct 9, 2017
7735f59
unstable book: OIBIT
tinaun Oct 10, 2017
364148d
unstable book: unboxed_closures
tinaun Oct 10, 2017
d078252
unstable book: fn_traits
tinaun Oct 10, 2017
ca61ea2
Shorten some test names
petrochenkov Oct 10, 2017
db91b00
output compiler message updated
jean-lourenco Oct 8, 2017
d5ef9f9
formatting fixes
tinaun Oct 10, 2017
23a5fb8
Merge branch 'master' into pep8-bootstrap
johnthagen Oct 11, 2017
3cb5294
Fix typo during merge from master
johnthagen Oct 11, 2017
c7aa741
rustc: Handle `#[linkage]` anywhere in a crate
alexcrichton Oct 10, 2017
17cacc8
Rollup merge of #45005 - leodasvacas:inline-eq-slice-into-eq, r=jseyf…
kennytm Oct 11, 2017
d628e44
Rollup merge of #45049 - alexcrichton:update-jobserver, r=sfackler
kennytm Oct 11, 2017
6654979
Rollup merge of #45105 - camsteffen:patch-2, r=pnkfelix
kennytm Oct 11, 2017
79ed52a
Rollup merge of #45121 - johnthagen:pep8-bootstrap, r=alexcrichton
kennytm Oct 11, 2017
9655312
Rollup merge of #45122 - jean-lourenco:master, r=nikomatsakis
kennytm Oct 11, 2017
5d25e1e
Rollup merge of #45166 - tinaun:more_unstable_docs, r=steveklabnik
kennytm Oct 11, 2017
44c0a9a
Rollup merge of #45189 - alexcrichton:thinlto-allocators, r=michaelwo…
kennytm Oct 11, 2017
9defb40
Rollup merge of #45190 - petrochenkov:shorten, r=alexcrichton
kennytm Oct 11, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/librustc/middle/reachable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ struct CollectPrivateImplItemsVisitor<'a, 'tcx: 'a> {

impl<'a, 'tcx: 'a> ItemLikeVisitor<'tcx> for CollectPrivateImplItemsVisitor<'a, 'tcx> {
fn visit_item(&mut self, item: &hir::Item) {
// Anything which has custom linkage gets thrown on the worklist no
// matter where it is in the crate.
if attr::contains_name(&item.attrs, "linkage") {
self.worklist.push(item.id);
}

// We need only trait impls here, not inherent impls, and only non-exported ones
if let hir::ItemImpl(.., Some(ref trait_ref), _, ref impl_item_refs) = item.node {
if !self.access_levels.is_reachable(item.id) {
Expand Down
19 changes: 19 additions & 0 deletions src/test/run-pass/thin-lto-global-allocator.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-flags: -Z thinlto -C codegen-units=2
// min-llvm-version 4.0

#![feature(allocator_api, global_allocator)]

#[global_allocator]
static A: std::heap::System = std::heap::System;

fn main() {}