Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/ui/crate-loading/missing-target-error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/37131>.
//! Tests that compiling for a target which is not installed will result in a helpful
//! error message.
//~^^^ ERROR can't find crate for `std`
//~| NOTE target may not be installed
//~| NOTE can't find crate

//@ compile-flags: --target=thumbv6m-none-eabi
//@ ignore-arm
//@ needs-llvm-components: arm
//@ ignore-backends: gcc

fn main() { }
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/37510>.
//! Test that else-if after if-let is not considered a pattern guard.
//@ check-pass

fn foo(_: &mut i32) -> bool { true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/38556>.
//! Reexport in macro caused ICE.
//@ run-pass

#![allow(dead_code)]
pub struct Foo;

Expand Down
12 changes: 0 additions & 12 deletions tests/ui/issues/issue-37131.rs

This file was deleted.

8 changes: 0 additions & 8 deletions tests/ui/issues/issue-3779.rs

This file was deleted.

17 changes: 0 additions & 17 deletions tests/ui/issues/issue-3779.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/37884>.
//! This used to leak compiler data structures in error message.
//@ dont-require-annotations: NOTE

struct RepeatMut<'a, T>(T, &'a ());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: method not compatible with trait
--> $DIR/issue-37884.rs:8:5
--> $DIR/iterator-next-extra-named-lifetime.rs:10:5
|
LL | fn next(&'a mut self) -> Option<Self::Item>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
Expand All @@ -9,7 +9,7 @@ LL | fn next(&'a mut self) -> Option<Self::Item>
note: the anonymous lifetime as defined here...
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
note: ...does not necessarily outlive the lifetime `'a` as defined here
--> $DIR/issue-37884.rs:5:6
--> $DIR/iterator-next-extra-named-lifetime.rs:7:6
|
LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
| ^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/3702>.
//! This used to trigger LLVM assertion.

pub trait ToPrimitive {
fn to_int(&self) -> isize { 0 }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
error[E0034]: multiple applicable items in scope
--> $DIR/issue-3702-2.rs:16:14
--> $DIR/ambig-method-call-in-trait-impl.rs:19:14
|
LL | self.to_int() + other.to_int()
| ^^^^^^ multiple `to_int` found
|
note: candidate #1 is defined in an impl of the trait `Add` for the type `isize`
--> $DIR/issue-3702-2.rs:14:5
--> $DIR/ambig-method-call-in-trait-impl.rs:17:5
|
LL | fn to_int(&self) -> isize { *self }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `ToPrimitive` for the type `isize`
--> $DIR/issue-3702-2.rs:2:5
--> $DIR/ambig-method-call-in-trait-impl.rs:5:5
|
LL | fn to_int(&self) -> isize { 0 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/3847>.
//! Pattern matching struct from different module caused parser to fail.
//@ run-pass

mod buildings {
pub struct Tower { pub height: usize }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/3753>.
//! Pub keyword after attribute caused parser to fail.
//@ run-pass
// Issue #3656
// Issue Name: pub method preceded by attribute can't be parsed
// Abstract: Visibility parsing failed when compiler parsing

use std::f64;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/3702>.
//! Calling method of trait defined in function used to trigger LLVM assertion.
//@ run-pass

#![allow(dead_code)]

pub fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/37665>.
//! Test type error when compiling with `unpretty=mir` doesn't ICE.
//@ compile-flags: -Z unpretty=mir

use std::path::MAIN_SEPARATOR;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-37665.rs:9:17
--> $DIR/mir-unpretty-type-error.rs:11:17
|
LL | let x: () = 0;
| -- ^ expected `()`, found integer
Expand Down
Loading