Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2538c0c
fix `SyncSender` spinning behavior
ibraheemdev Jan 11, 2023
f8276c9
add `SyncSender::send_timeout` test
ibraheemdev Jan 11, 2023
4e2a356
Add log-backtrace option to show backtraces along with logging
yukiomoto Jan 11, 2023
12ddf77
When suggesting writing a fully qualified path probe for appropriate …
estebank Jan 8, 2023
147c9bf
review comments
estebank Jan 8, 2023
c6f322b
review comments: account for generics
estebank Jan 8, 2023
8917e99
rework and document backoff behavior of `sync::mpsc`
ibraheemdev Jan 12, 2023
c825459
Provide help on closures capturing self causing borrow checker errors
chenyukang Jan 7, 2023
eafbca9
take care when there is no args in method call
chenyukang Jan 7, 2023
5457140
Bump IMPLIED_BOUNDS_ENTAILMENT to Deny + ReportNow
compiler-errors Jan 4, 2023
eaa7cc8
Add logic to make IMPLIED_BOUNDS_ENTAILMENT easier to understand
compiler-errors Jan 12, 2023
95ef76b
Normalize test output more thoroughly
Mark-Simulacrum Jan 13, 2023
138a1d2
riscv: Fix ELF header flags
FawazTirmizi Jan 9, 2023
549ece7
Warn when using panic-strategy abort for proc-macro crates
Veykril Jan 10, 2023
4aca7be
Remove redundant session field
oli-obk Dec 8, 2022
3bc2970
Improve linker-flavor detection
jschwe Jan 5, 2023
96bb02f
Rollup merge of #104645 - yukiomoto:log-backtrace-option, r=oli-obk
matthiaskrgr Jan 13, 2023
1dc43b2
Rollup merge of #106465 - compiler-errors:bump-IMPLIED_BOUNDS_ENTAILM…
matthiaskrgr Jan 13, 2023
f9dde54
Rollup merge of #106489 - jschwe:fix_linker_detection, r=petrochenkov
matthiaskrgr Jan 13, 2023
c6e3a47
Rollup merge of #106585 - estebank:issue-46585, r=compiler-errors
matthiaskrgr Jan 13, 2023
57b371a
Rollup merge of #106641 - chenyukang:yukang/fix-105761-segguest-this,…
matthiaskrgr Jan 13, 2023
e4d0104
Rollup merge of #106678 - Veykril:proc-macro-panic-abort, r=eholk
matthiaskrgr Jan 13, 2023
720137b
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
matthiaskrgr Jan 13, 2023
e0f6840
Rollup merge of #106793 - Mark-Simulacrum:normalize-test, r=compiler-…
matthiaskrgr Jan 13, 2023
278e02a
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
matthiaskrgr Jan 13, 2023
f709382
Rollup merge of #106813 - oli-obk:sess_cleanup, r=GuillaumeGomez,petr…
matthiaskrgr Jan 13, 2023
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
review comments: account for generics
  • Loading branch information
estebank committed Jan 11, 2023
commit c6f322bf300c7c963a4e4e8bb642c3959b74888a
8 changes: 6 additions & 2 deletions compiler/rustc_hir_analysis/src/astconv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2147,8 +2147,12 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
.is_accessible_from(self.item_def_id(), tcx)
&& tcx.all_impls(*trait_def_id)
.any(|impl_def_id| {
let trait_ref = tcx.impl_trait_ref(impl_def_id);
trait_ref.map_or(false, |impl_| {
let trait_ref = tcx.bound_impl_trait_ref(impl_def_id);
trait_ref.map_or(false, |trait_ref| {
let impl_ = trait_ref.subst(
tcx,
infcx.fresh_substs_for_item(span, impl_def_id),
);
infcx
.can_eq(
param_env,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// run-rustfix
trait Trait<A> {}

trait Assoc {
type Ty;
}

impl<A> Assoc for dyn Trait<A> {
type Ty = i32;
}

fn main() {
let _x: <dyn Trait<i32> as Assoc>::Ty; //~ ERROR ambiguous associated type
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// run-rustfix
trait Trait<A> {}

trait Assoc {
type Ty;
}

impl<A> Assoc for dyn Trait<A> {
type Ty = i32;
}

fn main() {
let _x: <dyn Trait<i32>>::Ty; //~ ERROR ambiguous associated type
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0223]: ambiguous associated type
--> $DIR/ambiguous-associated-type-with-generics.rs:13:13
|
LL | let _x: <dyn Trait<i32>>::Ty;
| ^^^^^^^^^^^^^^^^^^^^ help: use the fully-qualified path: `<dyn Trait<i32> as Assoc>::Ty`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0223`.
7 changes: 1 addition & 6 deletions tests/ui/did_you_mean/bad-assoc-ty.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,7 @@ error[E0223]: ambiguous associated type
--> $DIR/bad-assoc-ty.rs:33:10
|
LL | type H = Fn(u8) -> (u8)::Output;
| ^^^^^^^^^^^^^^^^^^^^^^
|
help: if there were a trait named `Example` with associated type `Output` implemented for `(dyn Fn(u8) -> u8 + 'static)`, you could use the fully-qualified path
|
LL | type H = <(dyn Fn(u8) -> u8 + 'static) as Example>::Output;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ^^^^^^^^^^^^^^^^^^^^^^ help: use the fully-qualified path: `<(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output`

error[E0223]: ambiguous associated type
--> $DIR/bad-assoc-ty.rs:39:19
Expand Down