From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/never_type/call-fn-never-arg-wrong-type.stderr | 2 +- tests/ui/never_type/defaulted-never-note.fallback.stderr | 2 +- .../never_type/diverging-fallback-no-leak.fallback.stderr | 2 +- .../never_type/diverging-fallback-unconstrained-return.rs | 4 ++-- tests/ui/never_type/exhaustive_patterns.stderr | 2 +- tests/ui/never_type/fallback-closure-wrap.fallback.stderr | 2 +- .../ui/never_type/feature-gate-never_type_fallback.stderr | 2 +- tests/ui/never_type/impl_trait_fallback3.stderr | 2 +- tests/ui/never_type/impl_trait_fallback4.stderr | 2 +- tests/ui/never_type/issue-10176.stderr | 2 +- tests/ui/never_type/issue-13352.stderr | 2 +- tests/ui/never_type/issue-51506.stderr | 2 +- tests/ui/never_type/never-assign-wrong-type.stderr | 2 +- .../never_type/never-from-impl-is-reserved.current.stderr | 14 ++++++++++++++ .../ui/never_type/never-from-impl-is-reserved.next.stderr | 14 ++++++++++++++ tests/ui/never_type/never-from-impl-is-reserved.rs | 3 +++ tests/ui/never_type/never-from-impl-is-reserved.stderr | 14 -------------- .../never-value-fallback-issue-66757.nofallback.stderr | 2 +- 18 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 tests/ui/never_type/never-from-impl-is-reserved.current.stderr create mode 100644 tests/ui/never_type/never-from-impl-is-reserved.next.stderr delete mode 100644 tests/ui/never_type/never-from-impl-is-reserved.stderr (limited to 'tests/ui/never_type') diff --git a/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr b/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr index fa3db33c9..bdeb2fb90 100644 --- a/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr +++ b/tests/ui/never_type/call-fn-never-arg-wrong-type.stderr @@ -14,6 +14,6 @@ note: function defined here LL | fn foo(x: !) -> ! { | ^^^ ---- -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/never_type/defaulted-never-note.fallback.stderr b/tests/ui/never_type/defaulted-never-note.fallback.stderr index 283aca1b0..92fa9068c 100644 --- a/tests/ui/never_type/defaulted-never-note.fallback.stderr +++ b/tests/ui/never_type/defaulted-never-note.fallback.stderr @@ -15,6 +15,6 @@ note: required by a bound in `foo` LL | fn foo(_t: T) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr index df29fe227..ff28480bd 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr +++ b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr @@ -17,6 +17,6 @@ note: required by a bound in `unconstrained_arg` LL | fn unconstrained_arg(_: T) {} | ^^^^ required by this bound in `unconstrained_arg` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs index 7ea97126f..26c8175be 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.rs +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.rs @@ -1,4 +1,4 @@ -// Variant of diverging-falllback-control-flow that tests +// Variant of diverging-fallback-control-flow that tests // the specific case of a free function with an unconstrained // return type. This captures the pattern we saw in the wild // in the objc crate, where changing the fallback from `!` to `()` @@ -9,7 +9,7 @@ // revisions: nofallback fallback #![cfg_attr(fallback, feature(never_type, never_type_fallback))] - +#![allow(unit_bindings)] fn make_unit() {} diff --git a/tests/ui/never_type/exhaustive_patterns.stderr b/tests/ui/never_type/exhaustive_patterns.stderr index f7bf85815..ee7d9070c 100644 --- a/tests/ui/never_type/exhaustive_patterns.stderr +++ b/tests/ui/never_type/exhaustive_patterns.stderr @@ -21,6 +21,6 @@ help: you might want to use `if let` to ignore the variant that isn't matched LL | if let Either::A(()) = foo() { todo!() }; | ++ +++++++++++ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0005`. diff --git a/tests/ui/never_type/fallback-closure-wrap.fallback.stderr b/tests/ui/never_type/fallback-closure-wrap.fallback.stderr index 49f55db1e..aa4a2760f 100644 --- a/tests/ui/never_type/fallback-closure-wrap.fallback.stderr +++ b/tests/ui/never_type/fallback-closure-wrap.fallback.stderr @@ -12,6 +12,6 @@ LL | | }) as Box); found type `!` = note: required for the cast from `Box<{closure@$DIR/fallback-closure-wrap.rs:18:40: 18:47}>` to `Box` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0271`. diff --git a/tests/ui/never_type/feature-gate-never_type_fallback.stderr b/tests/ui/never_type/feature-gate-never_type_fallback.stderr index 56aafbb4c..cbb670ea7 100644 --- a/tests/ui/never_type/feature-gate-never_type_fallback.stderr +++ b/tests/ui/never_type/feature-gate-never_type_fallback.stderr @@ -19,6 +19,6 @@ note: required by a bound in `foo` LL | fn foo(_: impl T) {} | ^ required by this bound in `foo` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/impl_trait_fallback3.stderr b/tests/ui/never_type/impl_trait_fallback3.stderr index 821d14156..e2246eea1 100644 --- a/tests/ui/never_type/impl_trait_fallback3.stderr +++ b/tests/ui/never_type/impl_trait_fallback3.stderr @@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one LL | trait T { | ^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/impl_trait_fallback4.stderr b/tests/ui/never_type/impl_trait_fallback4.stderr index 67421ba8d..8f6b5cfea 100644 --- a/tests/ui/never_type/impl_trait_fallback4.stderr +++ b/tests/ui/never_type/impl_trait_fallback4.stderr @@ -10,6 +10,6 @@ help: this trait has no implementations, consider adding one LL | trait T { | ^^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/issue-10176.stderr b/tests/ui/never_type/issue-10176.stderr index 3f381b9ae..cd6473e06 100644 --- a/tests/ui/never_type/issue-10176.stderr +++ b/tests/ui/never_type/issue-10176.stderr @@ -9,6 +9,6 @@ LL | (return 1, return 2) = note: expected type `isize` found tuple `(!, !)` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/never_type/issue-13352.stderr b/tests/ui/never_type/issue-13352.stderr index 406785bfe..91885380b 100644 --- a/tests/ui/never_type/issue-13352.stderr +++ b/tests/ui/never_type/issue-13352.stderr @@ -11,6 +11,6 @@ LL | 2_usize + (loop {}); <&'a usize as Add> <&usize as Add<&usize>> -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/issue-51506.stderr b/tests/ui/never_type/issue-51506.stderr index 293ec3a72..09379257c 100644 --- a/tests/ui/never_type/issue-51506.stderr +++ b/tests/ui/never_type/issue-51506.stderr @@ -11,6 +11,6 @@ note: required by a bound in `Trait::Out` LL | type Out: Iterator; | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait::Out` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/never_type/never-assign-wrong-type.stderr b/tests/ui/never_type/never-assign-wrong-type.stderr index ce34d9483..f59de5d2a 100644 --- a/tests/ui/never_type/never-assign-wrong-type.stderr +++ b/tests/ui/never_type/never-assign-wrong-type.stderr @@ -9,6 +9,6 @@ LL | let x: ! = "hello"; = note: expected type `!` found reference `&'static str` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/never_type/never-from-impl-is-reserved.current.stderr b/tests/ui/never_type/never-from-impl-is-reserved.current.stderr new file mode 100644 index 000000000..d008f88c1 --- /dev/null +++ b/tests/ui/never_type/never-from-impl-is-reserved.current.stderr @@ -0,0 +1,14 @@ +error[E0119]: conflicting implementations of trait `MyTrait` for type `MyFoo` + --> $DIR/never-from-impl-is-reserved.rs:13:1 + | +LL | impl MyTrait for MyFoo {} + | ---------------------- first implementation here +LL | // This will conflict with the first impl if we impl `for T: From`. +LL | impl MyTrait for T where T: From {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyFoo` + | + = note: permitting this impl would forbid us from adding `impl From for T` later; see rust-lang/rust#64715 for details + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/never_type/never-from-impl-is-reserved.next.stderr b/tests/ui/never_type/never-from-impl-is-reserved.next.stderr new file mode 100644 index 000000000..d008f88c1 --- /dev/null +++ b/tests/ui/never_type/never-from-impl-is-reserved.next.stderr @@ -0,0 +1,14 @@ +error[E0119]: conflicting implementations of trait `MyTrait` for type `MyFoo` + --> $DIR/never-from-impl-is-reserved.rs:13:1 + | +LL | impl MyTrait for MyFoo {} + | ---------------------- first implementation here +LL | // This will conflict with the first impl if we impl `for T: From`. +LL | impl MyTrait for T where T: From {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyFoo` + | + = note: permitting this impl would forbid us from adding `impl From for T` later; see rust-lang/rust#64715 for details + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/never_type/never-from-impl-is-reserved.rs b/tests/ui/never_type/never-from-impl-is-reserved.rs index 9d16015bd..97fac5914 100644 --- a/tests/ui/never_type/never-from-impl-is-reserved.rs +++ b/tests/ui/never_type/never-from-impl-is-reserved.rs @@ -1,5 +1,8 @@ // check that the `for T: From` impl is reserved +// revisions: current next +//[next] compile-flags: -Znext-solver=coherence + #![feature(never_type)] pub struct MyFoo; diff --git a/tests/ui/never_type/never-from-impl-is-reserved.stderr b/tests/ui/never_type/never-from-impl-is-reserved.stderr deleted file mode 100644 index 871c51205..000000000 --- a/tests/ui/never_type/never-from-impl-is-reserved.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `MyTrait` for type `MyFoo` - --> $DIR/never-from-impl-is-reserved.rs:10:1 - | -LL | impl MyTrait for MyFoo {} - | ---------------------- first implementation here -LL | // This will conflict with the first impl if we impl `for T: From`. -LL | impl MyTrait for T where T: From {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `MyFoo` - | - = note: permitting this impl would forbid us from adding `impl From for T` later; see rust-lang/rust#64715 for details - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr b/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr index cb3786305..f5249814c 100644 --- a/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr +++ b/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr @@ -7,6 +7,6 @@ LL | >::from(never); = help: the trait `From` is implemented for `E` = help: for that trait implementation, expected `!`, found `()` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. -- cgit v1.2.3