-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Tidying up tests/ui/issues 16 tests [7/N] #150384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| //! regression test for <https://github.com/rust-lang/rust/issues/2428> | ||
| //@ run-pass | ||
|
|
||
| fn main() { | ||
| const QUUX: isize = 5; | ||
|
|
||
| enum Stuff { | ||
| Bar = QUUX, | ||
| } | ||
|
|
||
| assert_eq!(Stuff::Bar as isize, QUUX); | ||
| } |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if this has anything to share with consts and const-eval, let's move it, whether to cast or if we have anything related to chars
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In issue #41998, I saw that the ICE log was coming from |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| //! regression test for <https://github.com/rust-lang/rust/issues/25180> | ||
| //@ check-pass | ||
| #![allow(dead_code)] | ||
|
|
||
| const X: &'static dyn Fn() = &|| println!("ICE here"); | ||
|
|
||
| fn main() {} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| //! regression test for <https://github.com/rust-lang/rust/issues/27639> | ||
| //! Ensure that a constant named `iter` does not | ||
| //! interfere with the name resolution of the `iter` methods used internally | ||
| //! by `for` loops | ||
| //@ run-pass | ||
| #![allow(dead_code)] | ||
| #![allow(non_upper_case_globals)] | ||
|
|
||
| fn main() { | ||
| const iter: i32 = 0; | ||
|
|
||
| for i in 1..10 { | ||
| println!("{}", i); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| //! regression test for <https://github.com/rust-lang/rust/issues/24389> | ||
| //@ check-pass | ||
| #![allow(dead_code)] | ||
|
|
||
| struct Foo; | ||
|
|
||
| impl Foo { | ||
| fn new() -> Self { | ||
| Foo | ||
| } | ||
| fn bar() { | ||
| Self::new(); | ||
| } | ||
| } | ||
|
|
||
| fn main() {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| //! regression test for <https://github.com/rust-lang/rust/issues/19601> | ||
| //@ check-pass | ||
|
|
||
| trait A<T> {} | ||
| struct B<T> | ||
| where | ||
| B<T>: A<B<T>>, | ||
| { | ||
| t: T, | ||
| } | ||
|
|
||
| fn main() {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| //! regression test for <https://github.com/rust-lang/rust/issues/11384> | ||
| //@ check-pass | ||
|
|
||
| trait Common { | ||
| fn dummy(&self) {} | ||
| } | ||
|
|
||
| impl<'t, T> Common for (T, &'t T) {} | ||
|
|
||
| impl<'t, T> Common for (&'t T, T) {} | ||
|
|
||
| fn main() {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| //@ run-pass | ||
| //! Regression test for <https://github.com/rust-lang/rust/issues/20676>. | ||
| //! Error was that we didn't support | ||
| //! UFCS-style calls to a method in `Trait` where `Self` was bound to a | ||
| //! trait object of type `Trait`. | ||
| //! See also <https://github.com/rust-lang/rust/blob/ec2cc76/tests/ui/traits/ufcs-object.rs>. | ||
|
|
||
| use std::fmt; | ||
|
|
||
| fn main() { | ||
| let a: &dyn fmt::Debug = &1; | ||
| let _ = format!("{:?}", a); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.