Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
34e9e6d
Fix duplicated type annotation suggestion
danobi Jul 9, 2022
f0a99f9
Fixup diagnostic-derive test
danobi Jul 9, 2022
6c44357
fix(doctest): treat fatal parse errors as incomplete attributes
notriddle Jul 11, 2022
033a025
Don't rerun the build script for the compiler each time on linux
jyn514 Jul 11, 2022
0c39762
Use fake substs to check for `Self: Sized` predicates on method recei…
compiler-errors Jul 11, 2022
88f2140
Do not suggest same trait over again
compiler-errors Jul 11, 2022
e3d84b2
clippy argument support
Milo123459 Jul 11, 2022
992346d
Fix rustdoc -Zhelp and -Chelp options
GuillaumeGomez Jul 8, 2022
b65d3a6
Add tests for -Chelp and -Zhelp
GuillaumeGomez Jul 8, 2022
29c128a
compiletest: trim edition before passing as flag
fee1-dead Jul 11, 2022
5c6560f
Fix sized check ICE in intrisicck
compiler-errors Jul 10, 2022
601c5a2
Rollup merge of #97210 - Milo123459:clippy-args, r=jyn514
matthiaskrgr Jul 11, 2022
c431e6f
Rollup merge of #99055 - GuillaumeGomez:rustdoc-help-options, r=jyn514
matthiaskrgr Jul 11, 2022
d89c183
Rollup merge of #99075 - danobi:dup_type_hint_sugg, r=petrochenkov
matthiaskrgr Jul 11, 2022
7151aaf
Rollup merge of #99124 - compiler-errors:issue-99122, r=oli-obk
matthiaskrgr Jul 11, 2022
24d241a
Rollup merge of #99142 - notriddle:notriddle/doctest-multiline-crate-…
matthiaskrgr Jul 11, 2022
1679d1c
Rollup merge of #99145 - jyn514:dont-rerun-build-script, r=wesleywiser
matthiaskrgr Jul 11, 2022
5e223dc
Rollup merge of #99146 - compiler-errors:issue-61525, r=lcnr
matthiaskrgr Jul 11, 2022
c05e277
Rollup merge of #99161 - fee1-dead-contrib:compile-test-edition-trim,…
matthiaskrgr Jul 11, 2022
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
Prev Previous commit
Next Next commit
Do not suggest same trait over again
  • Loading branch information
compiler-errors committed Jul 11, 2022
commit 88f2140d8736329610a4c0bd8000e164c9170537
5 changes: 3 additions & 2 deletions compiler/rustc_typeck/src/check/method/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use rustc_hir::def_id::DefId;
use rustc_infer::infer::{self, InferOk};
use rustc_middle::ty::subst::Subst;
use rustc_middle::ty::subst::{InternalSubsts, SubstsRef};
use rustc_middle::ty::GenericParamDefKind;
use rustc_middle::ty::{self, ToPredicate, Ty, TypeVisitable};
use rustc_middle::ty::{DefIdTree, GenericParamDefKind};
use rustc_span::symbol::Ident;
use rustc_span::Span;
use rustc_trait_selection::traits;
Expand Down Expand Up @@ -221,7 +221,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}

// We probe again, taking all traits into account (not only those in scope).
let candidates = match self.lookup_probe(
let mut candidates = match self.lookup_probe(
span,
segment.ident,
self_ty,
Expand All @@ -243,6 +243,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
.collect(),
_ => Vec::new(),
};
candidates.retain(|candidate| *candidate != self.tcx.parent(result.callee.def_id));

return Err(IllegalSizedBound(candidates, needs_mut, span));
}
Expand Down
5 changes: 0 additions & 5 deletions src/test/ui/issues/issue-35976.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ LL | fn wait(&self) where Self: Sized;
...
LL | arg.wait();
| ^^^^
|
help: another candidate was found in the following trait, perhaps add a `use` for it:
|
LL | use private::Future;
|

error: aborting due to previous error