Skip to content
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

Rollup of 8 pull requests #52570

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
829bc26
rustc: Remove a workaroudn in ThinLTO fixed upstream
alexcrichton Jul 18, 2018
ec4aaf1
Update stdsimd to undo an accidental stabilization
alexcrichton Jul 19, 2018
5332375
proc_macro: Preserve spans of attributes on functions
alexcrichton Jul 19, 2018
f775c6d
Fix docker/run.sh script when run locally
alexcrichton Jul 19, 2018
0320d1b
Add tests for #34784
wesleywiser Jul 20, 2018
2db7bec
Add compile-fail test for #33264
wesleywiser Jul 20, 2018
1aeed60
Add run-pass test for #44005
wesleywiser Jul 20, 2018
608caeb
Add compile-fail test for #42060
wesleywiser Jul 20, 2018
ea495e3
Add compile-fail test for #43196
wesleywiser Jul 20, 2018
3e0cb23
Update compile-fail tests to be ui tests
wesleywiser Jul 20, 2018
576cfc5
Remove duplicate E0396 tests
ljedrz Jul 19, 2018
826bec3
Update clippy
Manishearth Jul 20, 2018
c44f724
resolve: Remove unused parameter from `resolve_ident_in_module`
petrochenkov Jul 16, 2018
2214349
resolve: Rename `global_macros` to `macro_prelude`
petrochenkov Jul 16, 2018
c2533b6
resolve: Remove `SingleImports` in favor of a simple set
petrochenkov Jul 17, 2018
414a86e
resolve: Add some comments to in-module resolution
petrochenkov Jul 18, 2018
2eb83ee
data_structures: Add a reference wrapper for pointer-indexed maps/sets
petrochenkov Jul 18, 2018
32453db
resolve: Fully prohibit shadowing of in-scope names by globs in macro…
petrochenkov Jul 19, 2018
e7aeb2b
resolve: Add more comments to in-module resolution
petrochenkov Jul 19, 2018
382285a
Revert some use of `PtrKey` to fix parallel_queries build
petrochenkov Jul 20, 2018
967d252
Rollup merge of #52505 - alexcrichton:remove-thinlto-hack, r=nikomats…
pietroalbini Jul 20, 2018
e10194d
Rollup merge of #52527 - ljedrz:cleanup_13973, r=oli-obk
pietroalbini Jul 20, 2018
7a0ffda
Rollup merge of #52535 - alexcrichton:update-stdsimd, r=Mark-Simulacrum
pietroalbini Jul 20, 2018
db907de
Rollup merge of #52536 - alexcrichton:attr-spans, r=nikomatsakis
pietroalbini Jul 20, 2018
66eacaf
Rollup merge of #52540 - alexcrichton:tweak-script, r=kennytm
pietroalbini Jul 20, 2018
20fb948
Rollup merge of #52555 - petrochenkov:mresfact, r=alexcrichton
pietroalbini Jul 20, 2018
a73627e
Rollup merge of #52558 - wesleywiser:ice_melting, r=estebank
pietroalbini Jul 20, 2018
5407f1c
Rollup merge of #52562 - Manishearth:clippyup, r=kennytm
pietroalbini Jul 20, 2018
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
20 changes: 10 additions & 10 deletions src/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies = [
"html5ever 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
Expand Down Expand Up @@ -342,10 +342,10 @@ name = "clippy_lints"
version = "0.0.212"
dependencies = [
"cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
"if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
Expand Down Expand Up @@ -887,14 +887,14 @@ name = "idna"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "if_chain"
version = "0.1.2"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
Expand Down Expand Up @@ -1153,7 +1153,7 @@ dependencies = [

[[package]]
name = "matches"
version = "0.1.6"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
Expand Down Expand Up @@ -2868,7 +2868,7 @@ name = "unicode-bidi"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
Expand Down Expand Up @@ -2932,7 +2932,7 @@ version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

Expand Down Expand Up @@ -3123,7 +3123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum html5ever 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b04478cf718862650a0bf66acaf8f2f8c906fbc703f35c916c1f4211b069a364"
"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e"
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
"checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8"
"checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec"
"checksum ignore 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "787a5940ab88e0f2f3b2cad3687060bddcf67520f3b761abc31065c9c495d088"
"checksum is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5b386aef33a1c677be65237cb9d32c3f3ef56bd035949710c4bb13083eb053"
"checksum isatty 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6c324313540cd4d7ba008d43dc6606a32a5579f13cc17b2804c13096f0a5c522"
Expand All @@ -3148,7 +3148,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43"
"checksum markup5ever 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfedc97d5a503e96816d10fedcd5b42f760b2e525ce2f7ec71f6a41780548475"
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
"checksum matches 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "835511bab37c34c47da5cb44844bea2cfde0236db0b506f90ea4224482c9774a"
"checksum mdbook 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "90b5a8d7e341ceee5db3882a06078d42661ddcfa2b3687319cc5da76ec4e782f"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ objdir=$root_dir/obj

mkdir -p $HOME/.cargo
mkdir -p $objdir/tmp
mkdir $objdir/cores
mkdir -p $objdir/cores

args=
if [ "$SCCACHE_BUCKET" != "" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl<K, V> LeafNode<K, V> {
}

fn is_shared_root(&self) -> bool {
self as *const _ == &EMPTY_ROOT_NODE as *const _ as *const LeafNode<K, V>
ptr::eq(self, &EMPTY_ROOT_NODE as *const _ as *const _)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/lint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use hir::intravisit;
use hir;
use lint::builtin::BuiltinLintDiagnostics;
use session::{Session, DiagnosticMessageId};
use std::hash;
use std::{hash, ptr};
use syntax::ast;
use syntax::codemap::{MultiSpan, ExpnFormat};
use syntax::edition::Edition;
Expand Down Expand Up @@ -354,7 +354,7 @@ pub struct LintId {

impl PartialEq for LintId {
fn eq(&self, other: &LintId) -> bool {
(self.lint as *const Lint) == (other.lint as *const Lint)
ptr::eq(self.lint, other.lint)
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/librustc/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use std::ops::Deref;
use rustc_data_structures::sync::{self, Lrc, ParallelIterator, par_iter};
use std::slice;
use std::vec::IntoIter;
use std::mem;
use std::{mem, ptr};
use syntax::ast::{self, DUMMY_NODE_ID, Name, Ident, NodeId};
use syntax::attr;
use syntax::ext::hygiene::Mark;
Expand Down Expand Up @@ -527,8 +527,7 @@ impl<'tcx> PartialOrd for TyS<'tcx> {
impl<'tcx> PartialEq for TyS<'tcx> {
#[inline]
fn eq(&self, other: &TyS<'tcx>) -> bool {
// (self as *const _) == (other as *const _)
(self as *const TyS<'tcx>) == (other as *const TyS<'tcx>)
ptr::eq(self, other)
}
}
impl<'tcx> Eq for TyS<'tcx> {}
Expand Down Expand Up @@ -678,7 +677,7 @@ impl<T> PartialOrd for Slice<T> where T: PartialOrd {
impl<T: PartialEq> PartialEq for Slice<T> {
#[inline]
fn eq(&self, other: &Slice<T>) -> bool {
(self as *const _) == (other as *const _)
ptr::eq(self, other)
}
}
impl<T: Eq> Eq for Slice<T> {}
Expand Down Expand Up @@ -1730,7 +1729,7 @@ impl Ord for AdtDef {
impl PartialEq for AdtDef {
// AdtDef are always interned and this is part of TyS equality
#[inline]
fn eq(&self, other: &Self) -> bool { self as *const _ == other as *const _ }
fn eq(&self, other: &Self) -> bool { ptr::eq(self, other) }
}

impl Eq for AdtDef {}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/ty/query/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use ty::query::plumbing::CycleError;
use ty::context::TyCtxt;
use errors::Diagnostic;
use std::process;
use std::fmt;
use std::{fmt, ptr};
use std::collections::HashSet;
#[cfg(parallel_queries)]
use {
Expand Down Expand Up @@ -124,7 +124,7 @@ impl<'tcx> QueryJob<'tcx> {
while let Some(job) = current_job {
cycle.insert(0, job.info.clone());

if &*job as *const _ == self as *const _ {
if ptr::eq(&*job, self) {
// This is the end of the cycle
// The span entry we included was for the usage
// of the cycle itself, and not part of the cycle
Expand Down
14 changes: 0 additions & 14 deletions src/librustc_codegen_llvm/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,20 +759,6 @@ impl ThinModule {
cgcx.save_temp_bitcode(&module, "thin-lto-after-pm");
timeline.record("thin-done");

// FIXME: this is a hack around a bug in LLVM right now. Discovered in
// #46910 it was found out that on 32-bit MSVC LLVM will hit a codegen
// error if there's an available_externally function in the LLVM module.
// Typically we don't actually use these functions but ThinLTO makes
// heavy use of them when inlining across modules.
//
// Tracked upstream at https://bugs.llvm.org/show_bug.cgi?id=35736 this
// function call (and its definition on the C++ side of things)
// shouldn't be necessary eventually and we can safetly delete these few
// lines.
llvm::LLVMRustThinLTORemoveAvailableExternally(llmod);
cgcx.save_temp_bitcode(&module, "thin-lto-after-rm-ae");
timeline.record("no-ae");

Ok(module)
}
}
21 changes: 11 additions & 10 deletions src/librustc_data_structures/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,30 @@ extern crate rustc_cratesio_shim;

pub use rustc_serialize::hex::ToHex;

pub mod array_vec;
pub mod accumulate_vec;
pub mod small_vec;
pub mod array_vec;
pub mod base_n;
pub mod bitslice;
pub mod bitvec;
pub mod flock;
pub mod fx;
pub mod graph;
pub mod indexed_set;
pub mod indexed_vec;
pub mod obligation_forest;
pub mod owning_ref;
pub mod ptr_key;
pub mod sip128;
pub mod small_vec;
pub mod snapshot_map;
pub use ena::snapshot_vec;
pub mod sorted_map;
pub mod stable_hasher;
pub mod transitive_relation;
pub use ena::unify;
pub mod fx;
pub mod tuple_slice;
pub mod graph;
pub mod flock;
pub mod sync;
pub mod owning_ref;
pub mod tiny_list;
pub mod sorted_map;
pub mod transitive_relation;
pub mod tuple_slice;
pub use ena::unify;
pub mod work_queue;

pub struct OnDrop<F: Fn()>(pub F);
Expand Down
45 changes: 45 additions & 0 deletions src/librustc_data_structures/ptr_key.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright 2018 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.

use std::{hash, ptr};
use std::ops::Deref;

/// A wrapper around reference that compares and hashes like a pointer.
/// Can be used as a key in sets/maps indexed by pointers to avoid `unsafe`.
#[derive(Debug)]
pub struct PtrKey<'a, T: 'a>(pub &'a T);

impl<'a, T> Clone for PtrKey<'a, T> {
fn clone(&self) -> Self { *self }
}

impl<'a, T> Copy for PtrKey<'a, T> {}

impl<'a, T> PartialEq for PtrKey<'a, T> {
fn eq(&self, rhs: &Self) -> bool {
ptr::eq(self.0, rhs.0)
}
}

impl<'a, T> Eq for PtrKey<'a, T> {}

impl<'a, T> hash::Hash for PtrKey<'a, T> {
fn hash<H: hash::Hasher>(&self, hasher: &mut H) {
(self.0 as *const T).hash(hasher)
}
}

impl<'a, T> Deref for PtrKey<'a, T> {
type Target = T;

fn deref(&self) -> &Self::Target {
self.0
}
}
1 change: 0 additions & 1 deletion src/librustc_llvm/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,6 @@ extern "C" {
CU1: *mut *mut c_void,
CU2: *mut *mut c_void);
pub fn LLVMRustThinLTOPatchDICompileUnit(M: ModuleRef, CU: *mut c_void);
pub fn LLVMRustThinLTORemoveAvailableExternally(M: ModuleRef);

pub fn LLVMRustLinkerNew(M: ModuleRef) -> LinkerRef;
pub fn LLVMRustLinkerAdd(linker: LinkerRef,
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_resolve/build_reduced_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ impl<'a> Resolver<'a> {
binding: &'a NameBinding<'a>,
span: Span,
allow_shadowing: bool) {
if self.global_macros.insert(name, binding).is_some() && !allow_shadowing {
if self.macro_prelude.insert(name, binding).is_some() && !allow_shadowing {
let msg = format!("`{}` is already in scope", name);
let note =
"macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560)";
Expand Down Expand Up @@ -704,8 +704,7 @@ impl<'a> Resolver<'a> {
} else {
for (name, span) in legacy_imports.imports {
let ident = Ident::with_empty_ctxt(name);
let result = self.resolve_ident_in_module(module, ident, MacroNS,
false, false, span);
let result = self.resolve_ident_in_module(module, ident, MacroNS, false, span);
if let Ok(binding) = result {
let directive = macro_use_directive(span);
self.potentially_unused_imports.push(directive);
Expand Down
17 changes: 8 additions & 9 deletions src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ pub struct Resolver<'a> {

crate_loader: &'a mut dyn CrateLoader,
macro_names: FxHashSet<Ident>,
global_macros: FxHashMap<Name, &'a NameBinding<'a>>,
macro_prelude: FxHashMap<Name, &'a NameBinding<'a>>,
pub all_macros: FxHashMap<Name, Def>,
lexical_macro_resolutions: Vec<(Ident, &'a Cell<LegacyScope<'a>>)>,
macro_map: FxHashMap<DefId, Lrc<SyntaxExtension>>,
Expand Down Expand Up @@ -1715,7 +1715,7 @@ impl<'a> Resolver<'a> {

crate_loader,
macro_names: FxHashSet(),
global_macros: FxHashMap(),
macro_prelude: FxHashMap(),
all_macros: FxHashMap(),
lexical_macro_resolutions: Vec::new(),
macro_map: FxHashMap(),
Expand Down Expand Up @@ -2002,7 +2002,6 @@ impl<'a> Resolver<'a> {
module: Module<'a>,
mut ident: Ident,
ns: Namespace,
ignore_unresolved_invocations: bool,
record_used: bool,
span: Span)
-> Result<&'a NameBinding<'a>, Determinacy> {
Expand All @@ -2012,7 +2011,7 @@ impl<'a> Resolver<'a> {
self.current_module = self.macro_def_scope(def);
}
let result = self.resolve_ident_in_module_unadjusted(
module, ident, ns, ignore_unresolved_invocations, record_used, span,
module, ident, ns, false, record_used, span,
);
self.current_module = orig_current_module;
result
Expand Down Expand Up @@ -2518,7 +2517,7 @@ impl<'a> Resolver<'a> {
// If there is a TraitRef in scope for an impl, then the method must be in the
// trait.
if let Some((module, _)) = self.current_trait_ref {
if self.resolve_ident_in_module(module, ident, ns, false, false, span).is_err() {
if self.resolve_ident_in_module(module, ident, ns, false, span).is_err() {
let path = &self.current_trait_ref.as_ref().unwrap().1.path;
resolve_error(self, span, err(ident.name, &path_names_to_string(path)));
}
Expand Down Expand Up @@ -3225,7 +3224,7 @@ impl<'a> Resolver<'a> {
};
}
}
let is_global = self.global_macros.get(&path[0].name).cloned()
let is_global = self.macro_prelude.get(&path[0].name).cloned()
.map(|binding| binding.get_macro(self).kind() == MacroKind::Bang).unwrap_or(false);
if primary_ns != MacroNS && (is_global ||
self.macro_names.contains(&path[0].modern())) {
Expand Down Expand Up @@ -3468,7 +3467,7 @@ impl<'a> Resolver<'a> {
}

let binding = if let Some(module) = module {
self.resolve_ident_in_module(module, ident, ns, false, record_used, path_span)
self.resolve_ident_in_module(module, ident, ns, record_used, path_span)
} else if opt_ns == Some(MacroNS) {
self.resolve_lexical_macro_path_segment(ident, ns, record_used, path_span)
.map(MacroBinding::binding)
Expand Down Expand Up @@ -3762,7 +3761,7 @@ impl<'a> Resolver<'a> {
// Look for associated items in the current trait.
if let Some((module, _)) = self.current_trait_ref {
if let Ok(binding) =
self.resolve_ident_in_module(module, ident, ns, false, false, module.span) {
self.resolve_ident_in_module(module, ident, ns, false, module.span) {
let def = binding.def();
if filter_fn(def) {
return Some(if self.has_self.contains(&def.def_id()) {
Expand Down Expand Up @@ -4075,7 +4074,7 @@ impl<'a> Resolver<'a> {
let mut found_traits = Vec::new();
// Look for the current trait.
if let Some((module, _)) = self.current_trait_ref {
if self.resolve_ident_in_module(module, ident, ns, false, false, module.span).is_ok() {
if self.resolve_ident_in_module(module, ident, ns, false, module.span).is_ok() {
let def_id = module.def_id().unwrap();
found_traits.push(TraitCandidate { def_id: def_id, import_id: None });
}
Expand Down
Loading