granite-rust/tests
bors b4c4664167 Auto merge of #118118 - spastorino:do-not-erase-late-bound-regions-on-iat, r=compiler-errors
Do not erase late bound regions when selecting inherent associated types

In the fix for #97156 we would want the following code:

```rust
#![feature(inherent_associated_types)]
#![allow(incomplete_features)]

struct Foo<T>(T);

impl Foo<fn(&'static ())> {
    type Assoc = u32;
}

trait Other {}
impl Other for u32 {}

// FIXME(inherent_associated_types): Avoid emitting two diagnostics (they only differ in span).
// FIXME(inherent_associated_types): Enhancement: Spruce up the diagnostic by saying something like
// "implementation is not general enough" as is done for traits via
// `try_report_trait_placeholder_mismatch`.

fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {}
//~^ ERROR mismatched types
//~| ERROR mismatched types

fn main() {}
```

to fail with ...

```
error[E0220]: associated type `Assoc` not found for `Foo<for<'a> fn(&'a ())>` in the current scope
  --> tests/ui/associated-inherent-types/issue-109789.rs:18:36
   |
4  | struct Foo<T>(T);
   | ------------- associated item `Assoc` not found for this struct
...
18 | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {}
   |                                    ^^^^^ associated item not found in `Foo<for<'a> fn(&'a ())>`
   |
   = note: the associated type was found for
           - `Foo<fn(&'static ())>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0220`.
```

This PR fixes the ICE we are currently getting "was a subtype of Foo<Binder(fn(&ReStatic ()), [])> during selection but now it is not"

Also fixes #112631

r? `@lcnr`
2023-11-27 17:11:35 +00:00
..
assembly Remove now deprecated target x86_64-sun-solaris. 2023-11-20 15:15:47 +01:00
auxiliary
codegen convert ehcont-guard to an unstable option 2023-11-21 14:24:23 -08:00
codegen-units Automatically enable cross-crate inlining for small functions 2023-10-17 19:53:51 -04:00
coverage coverage: Simplify building coverage expressions based on sums 2023-11-25 12:29:20 +11:00
coverage-run-rustdoc coverage: Rename the run-coverage test mode to coverage-run 2023-11-08 16:41:24 +11:00
debuginfo Check alignment of pointers only when read/written through 2023-11-04 13:01:32 -04:00
incremental Remove asmjs from tests 2023-10-28 23:11:03 -07:00
mir-opt Bless MIR tests 2023-11-26 00:14:18 +00:00
pretty Remove unnecessary CVarArgs name skipping logic 2023-10-25 17:44:17 +02:00
run-make Bless run-make tests 2023-11-24 19:15:52 +01:00
run-make-fulldeps Merge Queries::{ongoing_codegen,linker}. 2023-11-22 13:22:49 +11:00
run-pass-valgrind
rustdoc Rollup merge of #118224 - dtolnay:rustdocsortunstable, r=fmease 2023-11-24 08:23:54 +01:00
rustdoc-gui rustdoc-search: add support for associated types 2023-11-19 18:54:36 -07:00
rustdoc-js rustdoc-search: avoid infinite where clause unbox 2023-11-24 10:42:11 -07:00
rustdoc-js-std rustdoc-search: make primitives and keywords less special 2023-11-21 13:59:26 -07:00
rustdoc-json rustdoc-json: Fix test so it actuall checks things 2023-11-09 12:13:16 +00:00
rustdoc-ui Manual find replace updates 2023-11-24 21:04:51 +01:00
ui Auto merge of #118118 - spastorino:do-not-erase-late-bound-regions-on-iat, r=compiler-errors 2023-11-27 17:11:35 +00:00
ui-fulldeps Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00
COMPILER_TESTS.md