Add test batch 4

This commit is contained in:
Oneirical 2025-08-20 14:02:57 -04:00
parent fa3155a644
commit 6ca69812cd
48 changed files with 91 additions and 64 deletions

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/68010
//@ build-pass
fn main() {

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/65230
trait T0 {}
trait T1: T0 {}

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-65230.rs:8:13
--> $DIR/mismatched-types-in-trait-impl-65230.rs:9:13
|
LL | impl T1 for &dyn T2 {}
| ^^^^^^^ lifetime mismatch
@ -7,7 +7,7 @@ LL | impl T1 for &dyn T2 {}
= note: expected trait `<&dyn T2 as T0>`
found trait `<&(dyn T2 + 'static) as T0>`
note: the anonymous lifetime as defined here...
--> $DIR/issue-65230.rs:8:13
--> $DIR/mismatched-types-in-trait-impl-65230.rs:9:13
|
LL | impl T1 for &dyn T2 {}
| ^

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/66702
// Breaks with values inside closures used to ICE (#66863)
fn main() {

View file

@ -1,5 +1,5 @@
error[E0767]: use of unreachable label `'some_label`
--> $DIR/issue-66702-break-outside-loop-val.rs:5:18
--> $DIR/labeled-break-in-async-fn-ice-66702.rs:6:18
|
LL | 'some_label: loop {
| ----------- unreachable label defined here
@ -9,7 +9,7 @@ LL | || break 'some_label ();
= note: labels are unreachable through functions, closures, async blocks and modules
error[E0267]: `break` inside of a closure
--> $DIR/issue-66702-break-outside-loop-val.rs:5:12
--> $DIR/labeled-break-in-async-fn-ice-66702.rs:6:12
|
LL | || break 'some_label ();
| -- ^^^^^^^^^^^^^^^^^^^^ cannot `break` inside of a closure

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/61108
fn main() {
let mut bad_letters = vec!['e', 't', 'o', 'i'];
for l in bad_letters {

View file

@ -1,5 +1,5 @@
error[E0382]: borrow of moved value: `bad_letters`
--> $DIR/issue-61108.rs:6:5
--> $DIR/borrow-of-moved-value-in-for-loop-61108.rs:7:5
|
LL | let mut bad_letters = vec!['e', 't', 'o', 'i'];
| --------------- move occurs because `bad_letters` has type `Vec<char>`, which does not implement the `Copy` trait

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/64559
fn main() {
let orig = vec![true];
for _val in orig {}

View file

@ -1,5 +1,5 @@
error[E0382]: use of moved value: `orig`
--> $DIR/issue-64559.rs:4:20
--> $DIR/moved-value-in-closure-suggestion-64559.rs:5:20
|
LL | let orig = vec![true];
| ---- move occurs because `orig` has type `Vec<bool>`, which does not implement the `Copy` trait

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/65131
fn get_pair(_a: &mut u32, _b: &mut u32) {}
macro_rules! x10 {

View file

@ -1,5 +1,5 @@
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/issue-65131.rs:14:22
--> $DIR/multiple-mutable-borrows-error-65131.rs:15:22
|
LL | get_pair(&mut x, &mut x);
| -------- ------ ^^^^^^ second mutable borrow occurs here

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/61623
fn f1<'a>(_: &'a mut ()) {}
fn f2<P>(_: P, _: ()) {}

View file

@ -1,5 +1,5 @@
error[E0596]: cannot borrow `*x.1` as mutable, as it is behind a `&` reference
--> $DIR/issue-61623.rs:6:19
--> $DIR/mutable-borrow-behind-reference-61623.rs:7:19
|
LL | f2(|| x.0, f1(x.1))
| ^^^ `x` is a `&` reference, so the data it refers to cannot be borrowed as mutable

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/62480
fn main() {
// This used to ICE during liveness check because `target_id` passed to
// `propagate_through_expr` would be the closure and not the `loop`, which wouldn't be found in

View file

@ -1,5 +1,5 @@
error[E0767]: use of unreachable label `'a`
--> $DIR/issue-62480.rs:6:18
--> $DIR/labeled-break-inside-closure-62480.rs:7:18
|
LL | 'a: {
| -- unreachable label defined here
@ -9,7 +9,7 @@ LL | || break 'a
= note: labels are unreachable through functions, closures, async blocks and modules
error[E0267]: `break` inside of a closure
--> $DIR/issue-62480.rs:6:12
--> $DIR/labeled-break-inside-closure-62480.rs:7:12
|
LL | || break 'a
| -- ^^^^^^^^ cannot `break` inside of a closure

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/66308
//@ build-pass
//@ compile-flags: --crate-type lib -C opt-level=0

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/66706
fn a() {
[0; [|_: _ &_| ()].len()]
//~^ ERROR expected one of `,` or `|`, found `&`

View file

@ -1,5 +1,5 @@
error: expected one of `,` or `|`, found `&`
--> $DIR/issue-66706.rs:2:16
--> $DIR/closure-type-error-during-const-eval-66706.rs:3:16
|
LL | [0; [|_: _ &_| ()].len()]
| -^ expected one of `,` or `|`
@ -7,13 +7,13 @@ LL | [0; [|_: _ &_| ()].len()]
| help: missing `,`
error: expected identifier, found reserved identifier `_`
--> $DIR/issue-66706.rs:8:20
--> $DIR/closure-type-error-during-const-eval-66706.rs:9:20
|
LL | [0; [|f @ &ref _| {} ; 0 ].len() ];
| ^ expected identifier, found reserved identifier
error: expected one of `,` or `|`, found `&`
--> $DIR/issue-66706.rs:13:17
--> $DIR/closure-type-error-during-const-eval-66706.rs:14:17
|
LL | [0; [|&_: _ &_| {}; 0 ].len()]
| -^ expected one of `,` or `|`
@ -21,7 +21,7 @@ LL | [0; [|&_: _ &_| {}; 0 ].len()]
| help: missing `,`
error: expected identifier, found reserved identifier `_`
--> $DIR/issue-66706.rs:19:26
--> $DIR/closure-type-error-during-const-eval-66706.rs:20:26
|
LL | [0; match [|f @ &ref _| () ] {} ]
| ----- ^ expected identifier, found reserved identifier
@ -29,13 +29,13 @@ LL | [0; match [|f @ &ref _| () ] {} ]
| while parsing this `match` expression
error[E0282]: type annotations needed
--> $DIR/issue-66706.rs:2:14
--> $DIR/closure-type-error-during-const-eval-66706.rs:3:14
|
LL | [0; [|_: _ &_| ()].len()]
| ^ cannot infer type
error[E0282]: type annotations needed
--> $DIR/issue-66706.rs:13:11
--> $DIR/closure-type-error-during-const-eval-66706.rs:14:11
|
LL | [0; [|&_: _ &_| {}; 0 ].len()]
| ^^^^^ cannot infer type

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/66667
fn first() {
second == 1 //~ ERROR binary operation
//~^ ERROR mismatched types

View file

@ -1,5 +1,5 @@
error[E0369]: binary operation `==` cannot be applied to type `fn() {second}`
--> $DIR/issue-66667-function-cmp-cycle.rs:2:12
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:3:12
|
LL | second == 1
| ------ ^^ - {integer}
@ -7,7 +7,7 @@ LL | second == 1
| fn() {second}
error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:2:15
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:3:15
|
LL | second == 1
| ^ expected fn item, found integer
@ -16,7 +16,7 @@ LL | second == 1
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:2:5
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:3:5
|
LL | fn first() {
| - help: try adding a return type: `-> bool`
@ -24,7 +24,7 @@ LL | second == 1
| ^^^^^^^^^^^ expected `()`, found `bool`
error[E0369]: binary operation `==` cannot be applied to type `fn() {first}`
--> $DIR/issue-66667-function-cmp-cycle.rs:8:11
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:9:11
|
LL | first == 1
| ----- ^^ - {integer}
@ -32,7 +32,7 @@ LL | first == 1
| fn() {first}
error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:8:14
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:9:14
|
LL | first == 1
| ^ expected fn item, found integer
@ -41,7 +41,7 @@ LL | first == 1
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:8:5
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:9:5
|
LL | fn second() {
| - help: try adding a return type: `-> bool`
@ -49,7 +49,7 @@ LL | first == 1
| ^^^^^^^^^^ expected `()`, found `bool`
error[E0369]: binary operation `==` cannot be applied to type `fn() {bar}`
--> $DIR/issue-66667-function-cmp-cycle.rs:14:9
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:15:9
|
LL | bar == 1
| --- ^^ - {integer}
@ -57,7 +57,7 @@ LL | bar == 1
| fn() {bar}
error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:14:12
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:15:12
|
LL | bar == 1
| ^ expected fn item, found integer
@ -66,7 +66,7 @@ LL | bar == 1
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:14:5
--> $DIR/cycle-error-comparing-function-inside-itself-66667.rs:15:5
|
LL | fn bar() {
| - help: try adding a return type: `-> bool`

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/64593
//@ check-pass
#![deny(improper_ctypes)]

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/69306
fn main() {}
struct S0<T>(T);

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:5:28
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:6:28
|
LL | impl<T> S0<T> {
| - expected this type parameter
@ -11,13 +11,13 @@ LL | const C: S0<u8> = Self(0);
= note: expected type parameter `T`
found type `{integer}`
note: tuple struct defined here
--> $DIR/issue-69306.rs:3:8
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:4:8
|
LL | struct S0<T>(T);
| ^^
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:5:23
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:6:23
|
LL | impl<T> S0<T> {
| - found this type parameter
@ -28,7 +28,7 @@ LL | const C: S0<u8> = Self(0);
found struct `S0<T>`
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:10:14
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:11:14
|
LL | impl<T> S0<T> {
| - expected this type parameter
@ -41,13 +41,13 @@ LL | Self(0);
= note: expected type parameter `T`
found type `{integer}`
note: tuple struct defined here
--> $DIR/issue-69306.rs:3:8
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:4:8
|
LL | struct S0<T>(T);
| ^^
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:27:14
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:28:14
|
LL | impl<T> Foo<T> for <S0<T> as Fun>::Out {
| - expected this type parameter
@ -60,13 +60,13 @@ LL | Self(0);
= note: expected type parameter `T`
found type `{integer}`
note: tuple struct defined here
--> $DIR/issue-69306.rs:3:8
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:4:8
|
LL | struct S0<T>(T);
| ^^
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:33:32
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:34:32
|
LL | impl<T> S1<T, u8> {
| - expected this type parameter
@ -78,13 +78,13 @@ LL | const C: S1<u8, u8> = Self(0, 1);
= note: expected type parameter `T`
found type `{integer}`
note: tuple struct defined here
--> $DIR/issue-69306.rs:31:8
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:32:8
|
LL | struct S1<T, U>(T, U);
| ^^
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:33:27
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:34:27
|
LL | impl<T> S1<T, u8> {
| - found this type parameter
@ -95,7 +95,7 @@ LL | const C: S1<u8, u8> = Self(0, 1);
found struct `S1<T, _>`
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:41:14
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:42:14
|
LL | impl<T> S2<T> {
| - expected type parameter
@ -111,13 +111,13 @@ LL | Self(x)
= note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
= note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
note: tuple struct defined here
--> $DIR/issue-69306.rs:38:8
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:39:8
|
LL | struct S2<T>(T);
| ^^
error[E0308]: mismatched types
--> $DIR/issue-69306.rs:41:9
--> $DIR/generic-struct-self-unconstrained-inference-vars-69306.rs:42:9
|
LL | impl<T> S2<T> {
| - found type parameter

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/68951
//@ check-pass
fn main() {

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/60622
#![deny(warnings)]
struct Borked {}

View file

@ -1,5 +1,5 @@
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
--> $DIR/issue-60622.rs:10:11
--> $DIR/late-bound-lifetime-parameters-60622.rs:11:11
|
LL | fn a(&self) {}
| - the late bound lifetime parameter is introduced here
@ -10,14 +10,14 @@ LL | b.a::<'_, T>();
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #42868 <https://github.com/rust-lang/rust/issues/42868>
note: the lint level is defined here
--> $DIR/issue-60622.rs:1:9
--> $DIR/late-bound-lifetime-parameters-60622.rs:2:9
|
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(late_bound_lifetime_arguments)]` implied by `#[deny(warnings)]`
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/issue-60622.rs:10:7
--> $DIR/late-bound-lifetime-parameters-60622.rs:11:7
|
LL | b.a::<'_, T>();
| ^ - help: remove the unnecessary generic argument
@ -25,7 +25,7 @@ LL | b.a::<'_, T>();
| expected 0 generic arguments
|
note: method defined here, with 0 generic parameters
--> $DIR/issue-60622.rs:6:8
--> $DIR/late-bound-lifetime-parameters-60622.rs:7:8
|
LL | fn a(&self) {}
| ^

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/63983
enum MyEnum {
Tuple(i32),
Struct{ s: i32 },

View file

@ -1,5 +1,5 @@
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `MyEnum::Tuple`
--> $DIR/issue-63983.rs:8:9
--> $DIR/unit-pattern-error-on-tuple-and-struct-variants-63983.rs:9:9
|
LL | Tuple(i32),
| ---------- `MyEnum::Tuple` defined here
@ -8,7 +8,7 @@ LL | MyEnum::Tuple => "",
| ^^^^^^^^^^^^^ help: use the tuple variant pattern syntax instead: `MyEnum::Tuple(_)`
error[E0533]: expected unit struct, unit variant or constant, found struct variant `MyEnum::Struct`
--> $DIR/issue-63983.rs:10:9
--> $DIR/unit-pattern-error-on-tuple-and-struct-variants-63983.rs:11:9
|
LL | MyEnum::Struct => "",
| ^^^^^^^^^^^^^^ not a unit struct, unit variant or constant

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/66923
// This test checks that errors are showed for lines with `collect` rather than `push` method.
fn main() {

View file

@ -1,5 +1,5 @@
error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64`
--> $DIR/issue-66923-show-error-for-correct-call.rs:8:39
--> $DIR/collect-method-type-mismatch-66923.rs:9:39
|
LL | let x2: Vec<f64> = x1.into_iter().collect();
| ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
@ -8,7 +8,7 @@ LL | let x2: Vec<f64> = x1.into_iter().collect();
but trait `FromIterator<_>` is implemented for it
= help: for that trait implementation, expected `f64`, found `&f64`
note: the method call chain might not have had the expected associated types
--> $DIR/issue-66923-show-error-for-correct-call.rs:8:27
--> $DIR/collect-method-type-mismatch-66923.rs:9:27
|
LL | let x1: &[f64] = &v;
| -- this expression has type `&Vec<f64>`
@ -18,7 +18,7 @@ note: required by a bound in `collect`
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64`
--> $DIR/issue-66923-show-error-for-correct-call.rs:12:39
--> $DIR/collect-method-type-mismatch-66923.rs:13:39
|
LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
| ------- ^^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
@ -29,7 +29,7 @@ LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
but trait `FromIterator<_>` is implemented for it
= help: for that trait implementation, expected `f64`, found `&f64`
note: the method call chain might not have had the expected associated types
--> $DIR/issue-66923-show-error-for-correct-call.rs:12:17
--> $DIR/collect-method-type-mismatch-66923.rs:13:17
|
LL | let x1: &[f64] = &v;
| -- this expression has type `&Vec<f64>`

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/61106
fn main() {
let x = String::new();
foo(x.clone()); //~ ERROR mismatched types

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-61106.rs:3:9
--> $DIR/string-clone-mismatch-61106.rs:4:9
|
LL | foo(x.clone());
| --- ^^^^^^^^^ expected `&str`, found `String`
@ -7,7 +7,7 @@ LL | foo(x.clone());
| arguments to this function are incorrect
|
note: function defined here
--> $DIR/issue-61106.rs:6:4
--> $DIR/string-clone-mismatch-61106.rs:7:4
|
LL | fn foo(_: &str) {}
| ^^^ -------

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/64430
//@ compile-flags:-C panic=abort
#![no_std]

View file

@ -1,5 +1,5 @@
error[E0599]: no method named `bar` found for struct `Foo` in the current scope
--> $DIR/issue-64430.rs:7:9
--> $DIR/no-std-panic-abort-error-64430.rs:8:9
|
LL | pub struct Foo;
| -------------- method `bar` not found for this struct

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/68696
// Checks that catch_unwind can be used if unwinding is already in progress.
// Used to fail when standard library had been compiled with debug assertions,
// due to incorrect assumption that a current thread is not panicking when

View file

@ -1,11 +1,11 @@
error: unknown start of token: \u{a7}
--> $DIR/issue-69130.rs:4:4
--> $DIR/character-indexing-bug-in-splice-lines-69130.rs:4:4
|
LL | M (§& u8)}
| ^
error[E0106]: missing lifetime specifier
--> $DIR/issue-69130.rs:4:5
--> $DIR/character-indexing-bug-in-splice-lines-69130.rs:4:5
|
LL | M (§& u8)}
| ^ expected named lifetime parameter

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/61475
//@ run-pass
#![allow(dead_code)]

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/64792
struct X {}
const Y: X = X("ö"); //~ ERROR expected function, tuple struct or tuple variant, found struct `X`

View file

@ -1,5 +1,5 @@
error[E0423]: expected function, tuple struct or tuple variant, found struct `X`
--> $DIR/issue-64792-bad-unicode-ctor.rs:3:14
--> $DIR/unicode-string-literal-syntax-error-64792.rs:4:14
|
LL | struct X {}
| ----------- `X` defined here

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/67535
fn main() {}
impl std::ops::AddAssign for () {

View file

@ -1,5 +1,5 @@
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/issue-67535.rs:3:1
--> $DIR/trait-implementation-for-non-local-types-67535.rs:4:1
|
LL | impl std::ops::AddAssign for () {
| ^^^^^-------------------^^^^^--
@ -12,7 +12,7 @@ LL | impl std::ops::AddAssign for () {
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/issue-67535.rs:10:1
--> $DIR/trait-implementation-for-non-local-types-67535.rs:11:1
|
LL | impl std::ops::AddAssign for [(); 1] {
| ^^^^^-------------------^^^^^-------
@ -25,7 +25,7 @@ LL | impl std::ops::AddAssign for [(); 1] {
= note: define and implement a trait or new type instead
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> $DIR/issue-67535.rs:17:1
--> $DIR/trait-implementation-for-non-local-types-67535.rs:18:1
|
LL | impl std::ops::AddAssign for &[u8] {
| ^^^^^-------------------^^^^^-----

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/66353
// #66353: ICE when trying to recover from incorrect associated type
trait _Func<T> {

View file

@ -1,17 +1,17 @@
error[E0277]: the trait bound `(): _A` is not satisfied
--> $DIR/issue-66353.rs:12:15
--> $DIR/associated-type-ice-recovery-66353.rs:13:15
|
LL | _Func::< <() as _A>::AssocT >::func(());
| ^^ the trait `_A` is not implemented for `()`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-66353.rs:7:1
--> $DIR/associated-type-ice-recovery-66353.rs:8:1
|
LL | trait _A {
| ^^^^^^^^
error[E0277]: the trait bound `(): _Func<_>` is not satisfied
--> $DIR/issue-66353.rs:12:41
--> $DIR/associated-type-ice-recovery-66353.rs:13:41
|
LL | _Func::< <() as _A>::AssocT >::func(());
| ----------------------------------- ^^ the trait `_Func<_>` is not implemented for `()`
@ -19,7 +19,7 @@ LL | _Func::< <() as _A>::AssocT >::func(());
| required by a bound introduced by this call
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-66353.rs:3:1
--> $DIR/associated-type-ice-recovery-66353.rs:4:1
|
LL | trait _Func<T> {
| ^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/60989
struct A {}
struct B {}

View file

@ -1,5 +1,5 @@
error[E0109]: type arguments are not allowed on local variable
--> $DIR/issue-60989.rs:12:10
--> $DIR/type-arguments-on-local-variable-60989.rs:13:10
|
LL | c1::<()>;
| -- ^^ type argument not allowed
@ -7,7 +7,7 @@ LL | c1::<()>;
| not allowed on local variable
error[E0109]: type arguments are not allowed on local variable
--> $DIR/issue-60989.rs:16:10
--> $DIR/type-arguments-on-local-variable-60989.rs:17:10
|
LL | c1::<dyn Into<B>>;
| -- ^^^^^^^^^^^ type argument not allowed

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/61894
//@ run-pass
#![feature(core_intrinsics)]
@ -17,5 +18,5 @@ impl<M> Bar<M> {
}
fn main() {
assert_eq!(Bar(()).foo(), "issue_61894::Bar<_>::foo::f");
assert_eq!(Bar(()).foo(), "type_name_intrinsic_usage_61894::Bar<_>::foo::f");
}

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/65462
//@ build-pass
enum Empty {}