From f718b516900105ccfce2b32c915b3c3b1a136a1c Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Wed, 9 Feb 2022 10:19:31 +0000 Subject: [PATCH] Update chalk tests --- .../bad-bounds-on-assoc-in-trait.rs | 1 - .../bad-bounds-on-assoc-in-trait.stderr | 6 +- .../ui/associated-type-bounds/trait-params.rs | 1 - .../ui/associated-type-bounds/union-bounds.rs | 1 - .../associated-types-stream.rs | 2 - .../hr-associated-type-bound-param-2.rs | 1 - .../hr-associated-type-bound-param-2.stderr | 12 ++-- .../hr-associated-type-bound-param-5.rs | 1 - .../hr-associated-type-bound-param-5.stderr | 8 +-- src/test/ui/associated-types/issue-50301.rs | 1 - src/test/ui/chalkify/assert.rs | 6 ++ src/test/ui/chalkify/println.rs | 3 +- src/test/ui/chalkify/trait-objects.rs | 3 +- .../const-eval/ub-nonnull.chalk.64bit.stderr | 9 +++ .../const-eval/ub-wide-ptr.chalk.64bit.stderr | 9 +++ .../ui/deriving/deriving-associated-types.rs | 1 - src/test/ui/impl-trait/example-calendar.rs | 1 - src/test/ui/impl-trait/issue-55872-2.rs | 1 - src/test/ui/impl-trait/issue-55872-2.stderr | 4 +- src/test/ui/impl-trait/issue-55872.rs | 1 - src/test/ui/impl-trait/issue-55872.stderr | 2 +- src/test/ui/impl-trait/issues/issue-65581.rs | 1 + src/test/ui/issues/issue-23122-1.rs | 6 +- src/test/ui/issues/issue-23122-2.rs | 5 +- src/test/ui/issues/issue-23122-2.stderr | 4 +- src/test/ui/issues/issue-28561.rs | 1 - src/test/ui/issues/issue-33187.rs | 16 +++-- src/test/ui/issues/issue-37051.rs | 1 - src/test/ui/issues/issue-55796.nll.stderr | 4 +- src/test/ui/issues/issue-55796.rs | 6 +- src/test/ui/issues/issue-55796.stderr | 20 +++---- .../issue-74564-if-expr-stack-overflow.rs | 1 - src/test/ui/nll/ty-outlives/issue-53789-2.rs | 59 ++++++++++--------- ....rs => default-associated-type-bound-1.rs} | 1 - ...=> default-associated-type-bound-1.stderr} | 6 +- ....rs => default-associated-type-bound-2.rs} | 0 ...=> default-associated-type-bound-2.stderr} | 6 +- ... default-generic-associated-type-bound.rs} | 0 ...ault-generic-associated-type-bound.stderr} | 6 +- .../ui/type-alias-impl-trait/issue-53598.rs | 1 - .../type-alias-impl-trait/issue-53598.stderr | 2 +- .../ui/type-alias-impl-trait/issue-57700.rs | 1 - .../type-alias-impl-trait/issue-57700.stderr | 2 +- .../ui/type-alias-impl-trait/issue-60371.rs | 2 - .../type-alias-impl-trait/issue-60371.stderr | 6 +- 45 files changed, 119 insertions(+), 112 deletions(-) create mode 100644 src/test/ui/chalkify/assert.rs create mode 100644 src/test/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr create mode 100644 src/test/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr rename src/test/ui/specialization/{deafult-associated-type-bound-1.rs => default-associated-type-bound-1.rs} (95%) rename src/test/ui/specialization/{deafult-associated-type-bound-1.stderr => default-associated-type-bound-1.stderr} (84%) rename src/test/ui/specialization/{deafult-associated-type-bound-2.rs => default-associated-type-bound-2.rs} (100%) rename src/test/ui/specialization/{deafult-associated-type-bound-2.stderr => default-associated-type-bound-2.stderr} (88%) rename src/test/ui/specialization/{deafult-generic-associated-type-bound.rs => default-generic-associated-type-bound.rs} (100%) rename src/test/ui/specialization/{deafult-generic-associated-type-bound.stderr => default-generic-associated-type-bound.stderr} (86%) diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs index 0c4907fd002..d180de9be3b 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs @@ -1,6 +1,5 @@ // NOTE: rustc cannot currently handle bounds of the form `for<'a> >::Assoc: Baz`. // This should hopefully be fixed with Chalk. -// ignore-compare-mode-chalk #![feature(associated_type_bounds)] diff --git a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr index 4ecae471ec2..c23e54594ee 100644 --- a/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr +++ b/src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr @@ -1,5 +1,5 @@ error[E0277]: `<::C as Iterator>::Item` cannot be sent between threads safely - --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:36 + --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:36 | LL | type C: Clone + Iterator Lam<&'a u8, App: Debug>> + Sync>; | ^^^^ `<::C as Iterator>::Item` cannot be sent between threads safely @@ -11,7 +11,7 @@ LL | trait Case1 where <::C as Iterator>::Item: Send { | ++++++++++++++++++++++++++++++++++++++++++++++++++ error[E0277]: `<::C as Iterator>::Item` is not an iterator - --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:43 + --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:43 | LL | type C: Clone + Iterator Lam<&'a u8, App: Debug>> + Sync>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<::C as Iterator>::Item` is not an iterator @@ -23,7 +23,7 @@ LL | trait Case1 where <::C as Iterator>::Item: Iterator { | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ error[E0277]: `<::C as Iterator>::Item` cannot be shared between threads safely - --> $DIR/bad-bounds-on-assoc-in-trait.rs:27:93 + --> $DIR/bad-bounds-on-assoc-in-trait.rs:26:93 | LL | type C: Clone + Iterator Lam<&'a u8, App: Debug>> + Sync>; | ^^^^ `<::C as Iterator>::Item` cannot be shared between threads safely diff --git a/src/test/ui/associated-type-bounds/trait-params.rs b/src/test/ui/associated-type-bounds/trait-params.rs index a9aa2747e52..b0703a4ee22 100644 --- a/src/test/ui/associated-type-bounds/trait-params.rs +++ b/src/test/ui/associated-type-bounds/trait-params.rs @@ -1,5 +1,4 @@ // build-pass (FIXME(62277): could be check-pass?) -// ignore-compare-mode-chalk #![feature(associated_type_bounds)] diff --git a/src/test/ui/associated-type-bounds/union-bounds.rs b/src/test/ui/associated-type-bounds/union-bounds.rs index f1aab2a6da0..97c5acf1f72 100644 --- a/src/test/ui/associated-type-bounds/union-bounds.rs +++ b/src/test/ui/associated-type-bounds/union-bounds.rs @@ -1,5 +1,4 @@ // run-pass -// ignore-compare-mode-chalk #![feature(associated_type_bounds)] #![feature(untagged_unions)] diff --git a/src/test/ui/associated-types/associated-types-stream.rs b/src/test/ui/associated-types/associated-types-stream.rs index 220ee6af2fc..c9b302b9691 100644 --- a/src/test/ui/associated-types/associated-types-stream.rs +++ b/src/test/ui/associated-types/associated-types-stream.rs @@ -1,8 +1,6 @@ // run-pass // Test references to the trait `Stream` in the bounds for associated // types defined on `Stream`. Issue #20551. -// ignore-compare-mode-chalk - trait Stream { type Car; diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs index 5193400882d..f74c5a8590d 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-2.rs @@ -1,4 +1,3 @@ -// ignore-compare-mode-chalk trait Z<'a, T: ?Sized> where T: Z<'a, u16>, diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr index 730229b5208..354caef1e41 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `str: Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-2.rs:4:8 + --> $DIR/hr-associated-type-bound-param-2.rs:3:8 | LL | T: Z<'a, u16>, | ^^^^^^^^^^ the trait `Clone` is not implemented for `str` | note: required by a bound in `Z` - --> $DIR/hr-associated-type-bound-param-2.rs:7:35 + --> $DIR/hr-associated-type-bound-param-2.rs:6:35 | LL | trait Z<'a, T: ?Sized> | - required by a bound in this @@ -14,13 +14,13 @@ LL | for<'b> >::W: Clone, | ^^^^^ required by this bound in `Z` error[E0277]: the trait bound `str: Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-2.rs:4:8 + --> $DIR/hr-associated-type-bound-param-2.rs:3:8 | LL | T: Z<'a, u16>, | ^^^^^^^^^^ the trait `Clone` is not implemented for `str` | note: required by a bound in `Z` - --> $DIR/hr-associated-type-bound-param-2.rs:7:35 + --> $DIR/hr-associated-type-bound-param-2.rs:6:35 | LL | trait Z<'a, T: ?Sized> | - required by a bound in this @@ -29,13 +29,13 @@ LL | for<'b> >::W: Clone, | ^^^^^ required by this bound in `Z` error[E0277]: the trait bound `str: Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-2.rs:16:14 + --> $DIR/hr-associated-type-bound-param-2.rs:15:14 | LL | type W = str; | ^^^ the trait `Clone` is not implemented for `str` | note: required by a bound in `Z` - --> $DIR/hr-associated-type-bound-param-2.rs:7:35 + --> $DIR/hr-associated-type-bound-param-2.rs:6:35 | LL | trait Z<'a, T: ?Sized> | - required by a bound in this diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs b/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs index 920aa835280..d7f3151a502 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-5.rs @@ -1,4 +1,3 @@ -// ignore-compare-mode-chalk trait Cycle: Sized { type Next: Cycle; } diff --git a/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr b/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr index 63cd89316b3..4c04d12a714 100644 --- a/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr +++ b/src/test/ui/associated-types/hr-associated-type-bound-param-5.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `str: Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-5.rs:27:14 + --> $DIR/hr-associated-type-bound-param-5.rs:26:14 | LL | type U = str; | ^^^ the trait `Clone` is not implemented for `str` | note: required by a bound in `X` - --> $DIR/hr-associated-type-bound-param-5.rs:18:45 + --> $DIR/hr-associated-type-bound-param-5.rs:17:45 | LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> | - required by a bound in this @@ -14,13 +14,13 @@ LL | for<'b> >::U: Clone, | ^^^^^ required by this bound in `X` error[E0277]: the trait bound `str: Clone` is not satisfied - --> $DIR/hr-associated-type-bound-param-5.rs:32:14 + --> $DIR/hr-associated-type-bound-param-5.rs:31:14 | LL | type U = str; | ^^^ the trait `Clone` is not implemented for `str` | note: required by a bound in `X` - --> $DIR/hr-associated-type-bound-param-5.rs:18:45 + --> $DIR/hr-associated-type-bound-param-5.rs:17:45 | LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> | - required by a bound in this diff --git a/src/test/ui/associated-types/issue-50301.rs b/src/test/ui/associated-types/issue-50301.rs index 4fcb41485d0..47ee3e7ad70 100644 --- a/src/test/ui/associated-types/issue-50301.rs +++ b/src/test/ui/associated-types/issue-50301.rs @@ -1,6 +1,5 @@ // Tests that HRTBs are correctly accepted -- https://github.com/rust-lang/rust/issues/50301 // check-pass -// ignore-compare-mode-chalk trait Trait where for<'a> &'a Self::IntoIter: IntoIterator, diff --git a/src/test/ui/chalkify/assert.rs b/src/test/ui/chalkify/assert.rs new file mode 100644 index 00000000000..f4ebf91924c --- /dev/null +++ b/src/test/ui/chalkify/assert.rs @@ -0,0 +1,6 @@ +// run-pass +// compile-flags: -Z chalk + +fn main() { + assert_eq!(1, 1); +} diff --git a/src/test/ui/chalkify/println.rs b/src/test/ui/chalkify/println.rs index cf36aef8afa..0f0df29019e 100644 --- a/src/test/ui/chalkify/println.rs +++ b/src/test/ui/chalkify/println.rs @@ -2,6 +2,5 @@ // compile-flags: -Z chalk fn main() { - // FIXME(chalk): Require `RegionOutlives`/`TypeOutlives`/`Subtype` support - //println!("hello"); + println!("hello"); } diff --git a/src/test/ui/chalkify/trait-objects.rs b/src/test/ui/chalkify/trait-objects.rs index 13d9e6a6578..d56abc42bf5 100644 --- a/src/test/ui/chalkify/trait-objects.rs +++ b/src/test/ui/chalkify/trait-objects.rs @@ -5,8 +5,7 @@ use std::fmt::Display; fn main() { let d: &dyn Display = &mut 3; - // FIXME(chalk) should be able to call d.to_string() as well, but doing so - // requires Chalk to be able to prove trait object well-formed goals. + d.to_string(); (&d).to_string(); let f: &dyn Fn(i32) -> _ = &|x| x + x; f(2); diff --git a/src/test/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr b/src/test/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr new file mode 100644 index 00000000000..2a4b6f3b76f --- /dev/null +++ b/src/test/ui/consts/const-eval/ub-nonnull.chalk.64bit.stderr @@ -0,0 +1,9 @@ +error[E0284]: type annotations needed: cannot satisfy `>::Output == _` + --> $DIR/ub-nonnull.rs:19:30 + | +LL | let out_of_bounds_ptr = &ptr[255]; + | ^^^^^^^^ cannot satisfy `>::Output == _` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0284`. diff --git a/src/test/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr b/src/test/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr new file mode 100644 index 00000000000..39352ca848a --- /dev/null +++ b/src/test/ui/consts/const-eval/ub-wide-ptr.chalk.64bit.stderr @@ -0,0 +1,9 @@ +error[E0282]: type annotations needed + --> $DIR/ub-wide-ptr.rs:90:67 + | +LL | const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]); + | ^^^^^^^^^^^^^^ cannot infer type for type parameter `U` declared on the function `transmute` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0282`. diff --git a/src/test/ui/deriving/deriving-associated-types.rs b/src/test/ui/deriving/deriving-associated-types.rs index 13735ff2c5a..4b1cbe80c50 100644 --- a/src/test/ui/deriving/deriving-associated-types.rs +++ b/src/test/ui/deriving/deriving-associated-types.rs @@ -1,5 +1,4 @@ // run-pass -// ignore-compare-mode-chalk pub trait DeclaredTrait { type Type; } diff --git a/src/test/ui/impl-trait/example-calendar.rs b/src/test/ui/impl-trait/example-calendar.rs index 45dcb74a6e0..da45f0d133d 100644 --- a/src/test/ui/impl-trait/example-calendar.rs +++ b/src/test/ui/impl-trait/example-calendar.rs @@ -1,5 +1,4 @@ // run-pass -// ignore-compare-mode-chalk #![feature(fn_traits, step_trait, diff --git a/src/test/ui/impl-trait/issue-55872-2.rs b/src/test/ui/impl-trait/issue-55872-2.rs index a519397806e..17a6a857874 100644 --- a/src/test/ui/impl-trait/issue-55872-2.rs +++ b/src/test/ui/impl-trait/issue-55872-2.rs @@ -1,5 +1,4 @@ // edition:2018 -// ignore-compare-mode-chalk #![feature(type_alias_impl_trait)] diff --git a/src/test/ui/impl-trait/issue-55872-2.stderr b/src/test/ui/impl-trait/issue-55872-2.stderr index 97545ba3d11..b76b564dfb1 100644 --- a/src/test/ui/impl-trait/issue-55872-2.stderr +++ b/src/test/ui/impl-trait/issue-55872-2.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `impl Future: Copy` is not satisfied - --> $DIR/issue-55872-2.rs:14:20 + --> $DIR/issue-55872-2.rs:13:20 | LL | fn foo() -> Self::E { | ^^^^^^^ the trait `Copy` is not implemented for `impl Future` error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-2.rs:14:28 + --> $DIR/issue-55872-2.rs:13:28 | LL | fn foo() -> Self::E { | ____________________________^ diff --git a/src/test/ui/impl-trait/issue-55872.rs b/src/test/ui/impl-trait/issue-55872.rs index bbd94025417..183728b0f7f 100644 --- a/src/test/ui/impl-trait/issue-55872.rs +++ b/src/test/ui/impl-trait/issue-55872.rs @@ -1,4 +1,3 @@ -// ignore-compare-mode-chalk #![feature(type_alias_impl_trait)] pub trait Bar { diff --git a/src/test/ui/impl-trait/issue-55872.stderr b/src/test/ui/impl-trait/issue-55872.stderr index 60654ec3461..39d870dc003 100644 --- a/src/test/ui/impl-trait/issue-55872.stderr +++ b/src/test/ui/impl-trait/issue-55872.stderr @@ -1,5 +1,5 @@ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872.rs:13:28 + --> $DIR/issue-55872.rs:12:28 | LL | fn foo() -> Self::E { | ____________________________^ diff --git a/src/test/ui/impl-trait/issues/issue-65581.rs b/src/test/ui/impl-trait/issues/issue-65581.rs index af65b79d3e8..b947fc1d239 100644 --- a/src/test/ui/impl-trait/issues/issue-65581.rs +++ b/src/test/ui/impl-trait/issues/issue-65581.rs @@ -1,4 +1,5 @@ // check-pass +// ignore-compare-mode-chalk #![allow(dead_code)] diff --git a/src/test/ui/issues/issue-23122-1.rs b/src/test/ui/issues/issue-23122-1.rs index efa4e614be5..7fe0900ed5f 100644 --- a/src/test/ui/issues/issue-23122-1.rs +++ b/src/test/ui/issues/issue-23122-1.rs @@ -1,10 +1,10 @@ -// ignore-compare-mode-chalk - trait Next { type Next: Next; } -struct GetNext { t: T } +struct GetNext { + t: T, +} impl Next for GetNext { type Next = as Next>::Next; diff --git a/src/test/ui/issues/issue-23122-2.rs b/src/test/ui/issues/issue-23122-2.rs index 7866b931ec4..95e1f60d8b0 100644 --- a/src/test/ui/issues/issue-23122-2.rs +++ b/src/test/ui/issues/issue-23122-2.rs @@ -1,9 +1,10 @@ -// ignore-compare-mode-chalk trait Next { type Next: Next; } -struct GetNext { t: T } +struct GetNext { + t: T, +} impl Next for GetNext { type Next = as Next>::Next; diff --git a/src/test/ui/issues/issue-23122-2.stderr b/src/test/ui/issues/issue-23122-2.stderr index b345e901787..7519e632d54 100644 --- a/src/test/ui/issues/issue-23122-2.stderr +++ b/src/test/ui/issues/issue-23122-2.stderr @@ -1,12 +1,12 @@ error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized` - --> $DIR/issue-23122-2.rs:9:17 + --> $DIR/issue-23122-2.rs:10:17 | LL | type Next = as Next>::Next; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`) note: required because of the requirements on the impl of `Next` for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` - --> $DIR/issue-23122-2.rs:8:15 + --> $DIR/issue-23122-2.rs:9:15 | LL | impl Next for GetNext { | ^^^^ ^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-28561.rs b/src/test/ui/issues/issue-28561.rs index 184f5cb26c5..1241fb0b1f8 100644 --- a/src/test/ui/issues/issue-28561.rs +++ b/src/test/ui/issues/issue-28561.rs @@ -1,5 +1,4 @@ // check-pass -// ignore-compare-mode-chalk #[derive(Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] struct Array { f00: [T; 00], diff --git a/src/test/ui/issues/issue-33187.rs b/src/test/ui/issues/issue-33187.rs index f6b56610ec7..8db9e005885 100644 --- a/src/test/ui/issues/issue-33187.rs +++ b/src/test/ui/issues/issue-33187.rs @@ -1,10 +1,15 @@ // run-pass -// ignore-compare-mode-chalk + struct Foo(::Data); -impl Copy for Foo where ::Data: Copy { } -impl Clone for Foo where ::Data: Clone { - fn clone(&self) -> Self { Foo(self.0.clone()) } +impl Copy for Foo where ::Data: Copy {} +impl Clone for Foo +where + ::Data: Clone, +{ + fn clone(&self) -> Self { + Foo(self.0.clone()) + } } trait Repr { @@ -15,5 +20,4 @@ impl Repr for A { type Data = u32; } -fn main() { -} +fn main() {} diff --git a/src/test/ui/issues/issue-37051.rs b/src/test/ui/issues/issue-37051.rs index e0c47197eaa..9cae6cf5e76 100644 --- a/src/test/ui/issues/issue-37051.rs +++ b/src/test/ui/issues/issue-37051.rs @@ -1,5 +1,4 @@ // check-pass -// ignore-compare-mode-chalk #![feature(associated_type_defaults)] diff --git a/src/test/ui/issues/issue-55796.nll.stderr b/src/test/ui/issues/issue-55796.nll.stderr index c1a3084f30e..5809a56cd4b 100644 --- a/src/test/ui/issues/issue-55796.nll.stderr +++ b/src/test/ui/issues/issue-55796.nll.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/issue-55796.rs:18:9 + --> $DIR/issue-55796.rs:16:9 | LL | pub trait Graph<'a> { | -- lifetime `'a` defined here @@ -8,7 +8,7 @@ LL | Box::new(self.out_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` error: lifetime may not live long enough - --> $DIR/issue-55796.rs:23:9 + --> $DIR/issue-55796.rs:21:9 | LL | pub trait Graph<'a> { | -- lifetime `'a` defined here diff --git a/src/test/ui/issues/issue-55796.rs b/src/test/ui/issues/issue-55796.rs index 1086669ee74..d802ce3b6cf 100644 --- a/src/test/ui/issues/issue-55796.rs +++ b/src/test/ui/issues/issue-55796.rs @@ -1,5 +1,3 @@ -// ignore-compare-mode-chalk - pub trait EdgeTrait { fn target(&self) -> N; } @@ -16,12 +14,12 @@ pub trait Graph<'a> { fn out_neighbors(&'a self, u: &Self::Node) -> Box> { Box::new(self.out_edges(u).map(|e| e.target())) -//~^ ERROR cannot infer + //~^ ERROR cannot infer } fn in_neighbors(&'a self, u: &Self::Node) -> Box> { Box::new(self.in_edges(u).map(|e| e.target())) -//~^ ERROR cannot infer + //~^ ERROR cannot infer } } diff --git a/src/test/ui/issues/issue-55796.stderr b/src/test/ui/issues/issue-55796.stderr index 304339657f0..569a13f45bc 100644 --- a/src/test/ui/issues/issue-55796.stderr +++ b/src/test/ui/issues/issue-55796.stderr @@ -1,22 +1,22 @@ error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements - --> $DIR/issue-55796.rs:18:9 + --> $DIR/issue-55796.rs:16:9 | LL | Box::new(self.out_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime `'a` as defined here... - --> $DIR/issue-55796.rs:7:17 + --> $DIR/issue-55796.rs:5:17 | LL | pub trait Graph<'a> { | ^^ -note: ...so that the type `Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:18:40: 18:54]>` will meet its required lifetime bounds - --> $DIR/issue-55796.rs:18:9 +note: ...so that the type `Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:16:40: 16:54]>` will meet its required lifetime bounds + --> $DIR/issue-55796.rs:16:9 | LL | Box::new(self.out_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: but, the lifetime must be valid for the static lifetime... note: ...so that the types are compatible - --> $DIR/issue-55796.rs:18:9 + --> $DIR/issue-55796.rs:16:9 | LL | Box::new(self.out_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -24,24 +24,24 @@ LL | Box::new(self.out_edges(u).map(|e| e.target())) found `Box>::Node>>` error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements - --> $DIR/issue-55796.rs:23:9 + --> $DIR/issue-55796.rs:21:9 | LL | Box::new(self.in_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime `'a` as defined here... - --> $DIR/issue-55796.rs:7:17 + --> $DIR/issue-55796.rs:5:17 | LL | pub trait Graph<'a> { | ^^ -note: ...so that the type `Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:23:39: 23:53]>` will meet its required lifetime bounds - --> $DIR/issue-55796.rs:23:9 +note: ...so that the type `Map<>::EdgesIter, [closure@$DIR/issue-55796.rs:21:39: 21:53]>` will meet its required lifetime bounds + --> $DIR/issue-55796.rs:21:9 | LL | Box::new(self.in_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: but, the lifetime must be valid for the static lifetime... note: ...so that the types are compatible - --> $DIR/issue-55796.rs:23:9 + --> $DIR/issue-55796.rs:21:9 | LL | Box::new(self.in_edges(u).map(|e| e.target())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs b/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs index 44ea9f12d38..36e9932602f 100644 --- a/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs +++ b/src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs @@ -1,6 +1,5 @@ // build-pass // ignore-tidy-filelength -// ignore-compare-mode-chalk #![crate_type = "rlib"] fn banana(v: &str) -> u32 { diff --git a/src/test/ui/nll/ty-outlives/issue-53789-2.rs b/src/test/ui/nll/ty-outlives/issue-53789-2.rs index d15e4024607..5109a0e4a68 100644 --- a/src/test/ui/nll/ty-outlives/issue-53789-2.rs +++ b/src/test/ui/nll/ty-outlives/issue-53789-2.rs @@ -1,16 +1,14 @@ // Regression test for #53789. // // check-pass -// ignore-compare-mode-chalk +use std::cmp::Ord; use std::collections::BTreeMap; use std::ops::Range; -use std::cmp::Ord; macro_rules! valuetree { () => { - type ValueTree = - ::Value; + type ValueTree = ::Value; }; } @@ -41,7 +39,9 @@ macro_rules! product_type { macro_rules! default { ($type: ty, $val: expr) => { impl Default for $type { - fn default() -> Self { $val.into() } + fn default() -> Self { + $val.into() + } } }; } @@ -90,21 +90,17 @@ trait ValueTree { } trait Strategy { - type Value : ValueTree; + type Value: ValueTree; } #[derive(Clone)] -struct VecStrategy { +struct VecStrategy { element: T, size: Range, } -fn vec(element: T, size: Range) - -> VecStrategy { - VecStrategy { - element: element, - size: size, - } +fn vec(element: T, size: Range) -> VecStrategy { + VecStrategy { element: element, size: size } } type ValueFor = <::Value as ValueTree>::Value; @@ -124,7 +120,6 @@ type StrategyType<'a, A> = >::Strategy; struct SizeBounds(Range); default!(SizeBounds, 0..100); - impl From> for SizeBounds { fn from(high: Range) -> Self { unimplemented!() @@ -137,24 +132,26 @@ impl From for Range { } } - -fn any_with<'a, A: Arbitrary<'a>>(args: A::Parameters) - -> StrategyType<'a, A> { +fn any_with<'a, A: Arbitrary<'a>>(args: A::Parameters) -> StrategyType<'a, A> { unimplemented!() } -impl Strategy for (K, V) where - ::Value: Ord { +impl Strategy for (K, V) +where + ::Value: Ord, +{ type Value = TupleValueTree<(K, V)>; } -impl ValueTree for TupleValueTree<(K, V)> where - ::Value: Ord { +impl ValueTree for TupleValueTree<(K, V)> +where + ::Value: Ord, +{ type Value = BTreeMapValueTree; } #[derive(Clone)] -struct VecValueTree { +struct VecValueTree { elements: Vec, } @@ -185,8 +182,8 @@ impl<'a, A, B> Arbitrary<'a> for BTreeMap where A: Arbitrary<'static> + Ord, B: Arbitrary<'static>, -StrategyFor: 'static, -StrategyFor: 'static, + StrategyFor: 'static, + StrategyFor: 'static, { valuetree!(); type Parameters = RangedParams2; @@ -208,10 +205,14 @@ mapfn! { } } -fn btree_map - (key: K, value: V, size: Range) - -> BTreeMapStrategy -where ValueFor : Ord { +fn btree_map( + key: K, + value: V, + size: Range, +) -> BTreeMapStrategy +where + ValueFor: Ord, +{ unimplemented!() } @@ -245,4 +246,4 @@ mod statics { } } -fn main() { } +fn main() {} diff --git a/src/test/ui/specialization/deafult-associated-type-bound-1.rs b/src/test/ui/specialization/default-associated-type-bound-1.rs similarity index 95% rename from src/test/ui/specialization/deafult-associated-type-bound-1.rs rename to src/test/ui/specialization/default-associated-type-bound-1.rs index 6eb2aa980d1..c043114b565 100644 --- a/src/test/ui/specialization/deafult-associated-type-bound-1.rs +++ b/src/test/ui/specialization/default-associated-type-bound-1.rs @@ -1,6 +1,5 @@ // Check that we check that default associated types satisfy the required // bounds on them. -// ignore-compare-mode-chalk #![feature(specialization)] //~^ WARNING `specialization` is incomplete diff --git a/src/test/ui/specialization/deafult-associated-type-bound-1.stderr b/src/test/ui/specialization/default-associated-type-bound-1.stderr similarity index 84% rename from src/test/ui/specialization/deafult-associated-type-bound-1.stderr rename to src/test/ui/specialization/default-associated-type-bound-1.stderr index 9e400f87024..6680a29f942 100644 --- a/src/test/ui/specialization/deafult-associated-type-bound-1.stderr +++ b/src/test/ui/specialization/default-associated-type-bound-1.stderr @@ -1,5 +1,5 @@ warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/deafult-associated-type-bound-1.rs:5:12 + --> $DIR/default-associated-type-bound-1.rs:4:12 | LL | #![feature(specialization)] | ^^^^^^^^^^^^^^ @@ -9,13 +9,13 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete error[E0277]: the trait bound `str: Clone` is not satisfied - --> $DIR/deafult-associated-type-bound-1.rs:19:22 + --> $DIR/default-associated-type-bound-1.rs:18:22 | LL | default type U = str; | ^^^ the trait `Clone` is not implemented for `str` | note: required by a bound in `X::U` - --> $DIR/deafult-associated-type-bound-1.rs:9:13 + --> $DIR/default-associated-type-bound-1.rs:8:13 | LL | type U: Clone; | ^^^^^ required by this bound in `X::U` diff --git a/src/test/ui/specialization/deafult-associated-type-bound-2.rs b/src/test/ui/specialization/default-associated-type-bound-2.rs similarity index 100% rename from src/test/ui/specialization/deafult-associated-type-bound-2.rs rename to src/test/ui/specialization/default-associated-type-bound-2.rs diff --git a/src/test/ui/specialization/deafult-associated-type-bound-2.stderr b/src/test/ui/specialization/default-associated-type-bound-2.stderr similarity index 88% rename from src/test/ui/specialization/deafult-associated-type-bound-2.stderr rename to src/test/ui/specialization/default-associated-type-bound-2.stderr index 47ea69d40bb..0fd1f65b0a2 100644 --- a/src/test/ui/specialization/deafult-associated-type-bound-2.stderr +++ b/src/test/ui/specialization/default-associated-type-bound-2.stderr @@ -1,5 +1,5 @@ warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/deafult-associated-type-bound-2.rs:2:12 + --> $DIR/default-associated-type-bound-2.rs:2:12 | LL | #![feature(specialization)] | ^^^^^^^^^^^^^^ @@ -9,14 +9,14 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete error[E0277]: can't compare `&'static B` with `B` - --> $DIR/deafult-associated-type-bound-2.rs:16:22 + --> $DIR/default-associated-type-bound-2.rs:16:22 | LL | default type U = &'static B; | ^^^^^^^^^^ no implementation for `&'static B == B` | = help: the trait `PartialEq` is not implemented for `&'static B` note: required by a bound in `X::U` - --> $DIR/deafult-associated-type-bound-2.rs:6:13 + --> $DIR/default-associated-type-bound-2.rs:6:13 | LL | type U: PartialEq; | ^^^^^^^^^^^^ required by this bound in `X::U` diff --git a/src/test/ui/specialization/deafult-generic-associated-type-bound.rs b/src/test/ui/specialization/default-generic-associated-type-bound.rs similarity index 100% rename from src/test/ui/specialization/deafult-generic-associated-type-bound.rs rename to src/test/ui/specialization/default-generic-associated-type-bound.rs diff --git a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr b/src/test/ui/specialization/default-generic-associated-type-bound.stderr similarity index 86% rename from src/test/ui/specialization/deafult-generic-associated-type-bound.stderr rename to src/test/ui/specialization/default-generic-associated-type-bound.stderr index da5fe97cf1b..58c6667c8c7 100644 --- a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr +++ b/src/test/ui/specialization/default-generic-associated-type-bound.stderr @@ -1,5 +1,5 @@ warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/deafult-generic-associated-type-bound.rs:3:12 + --> $DIR/default-generic-associated-type-bound.rs:3:12 | LL | #![feature(specialization)] | ^^^^^^^^^^^^^^ @@ -9,14 +9,14 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete error[E0277]: can't compare `T` with `T` - --> $DIR/deafult-generic-associated-type-bound.rs:18:26 + --> $DIR/default-generic-associated-type-bound.rs:18:26 | LL | default type U<'a> = &'a T; | ^^^^^ no implementation for `T == T` | = note: required because of the requirements on the impl of `PartialEq` for `&'a T` note: required by a bound in `X::U` - --> $DIR/deafult-generic-associated-type-bound.rs:8:17 + --> $DIR/default-generic-associated-type-bound.rs:8:17 | LL | type U<'a>: PartialEq<&'a Self> where Self: 'a; | ^^^^^^^^^^^^^^^^^^^ required by this bound in `X::U` diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.rs b/src/test/ui/type-alias-impl-trait/issue-53598.rs index 37b330ba4b8..f936dc42f13 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53598.rs +++ b/src/test/ui/type-alias-impl-trait/issue-53598.rs @@ -1,4 +1,3 @@ -// ignore-compare-mode-chalk #![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.stderr b/src/test/ui/type-alias-impl-trait/issue-53598.stderr index 4c8144a2359..9971c7e0e20 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53598.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53598.stderr @@ -1,5 +1,5 @@ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-53598.rs:20:42 + --> $DIR/issue-53598.rs:19:42 | LL | fn foo(_: T) -> Self::Item { | __________________________________________^ diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.rs b/src/test/ui/type-alias-impl-trait/issue-57700.rs index f1db4d3291b..13a6b7c2f7c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57700.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57700.rs @@ -1,4 +1,3 @@ -// ignore-compare-mode-chalk #![feature(arbitrary_self_types)] #![feature(type_alias_impl_trait)] diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.stderr b/src/test/ui/type-alias-impl-trait/issue-57700.stderr index c701e3e74ef..b2e3f46f1f5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57700.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-57700.stderr @@ -1,5 +1,5 @@ error: type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-57700.rs:16:58 + --> $DIR/issue-57700.rs:15:58 | LL | fn foo(self: impl Deref) -> Self::Bar { | __________________________________________________________^ diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.rs b/src/test/ui/type-alias-impl-trait/issue-60371.rs index 9d2ba849c86..badf35484f3 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60371.rs +++ b/src/test/ui/type-alias-impl-trait/issue-60371.rs @@ -1,5 +1,3 @@ -// ignore-compare-mode-chalk - trait Bug { type Item: Bug; diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.stderr b/src/test/ui/type-alias-impl-trait/issue-60371.stderr index 62ab7eb4560..dc8a381aece 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60371.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60371.stderr @@ -1,5 +1,5 @@ error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/issue-60371.rs:10:17 + --> $DIR/issue-60371.rs:8:17 | LL | type Item = impl Bug; | ^^^^^^^^ @@ -8,7 +8,7 @@ LL | type Item = impl Bug; = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0277]: the trait bound `(): Bug` is not satisfied - --> $DIR/issue-60371.rs:12:40 + --> $DIR/issue-60371.rs:10:40 | LL | const FUN: fn() -> Self::Item = || (); | ^ the trait `Bug` is not implemented for `()` @@ -17,7 +17,7 @@ LL | const FUN: fn() -> Self::Item = || (); <&() as Bug> error: non-defining opaque type use in defining scope - --> $DIR/issue-60371.rs:12:37 + --> $DIR/issue-60371.rs:10:37 | LL | impl Bug for &() { | - cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type