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
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/51655>.
//! This used to ICE.
//@ check-pass

#![allow(dead_code)]

const PATH_DOT: &[u8] = &[b'.'];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use std::fmt;
//! Auxiliary file for <https://github.com/rust-lang/rust/issues/24687>.
//! This is a file with many multi-byte characters, to try to encourage
//! the compiler to trip on them. The Drop implementation below will
//! need to have its source location embedded into the debug info for
//! the output file.

// This ia file with many multi-byte characters, to try to encourage
// the compiler to trip on them. The Drop implementation below will
// need to have its source location embedded into the debug info for
// the output file.
use std::fmt;

// αααααααααααααααααααααααααααααααααααααααααααααααααααααααααααααααααααααα
// ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Expand Down
10 changes: 10 additions & 0 deletions tests/ui/debuginfo/auxiliary/cross-crate-multibyte-debuginfo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! Auxiliary file for <https://github.com/rust-lang/rust/issues/24687>.
//! This is a file that pulls in a separate file as a submodule, where
//! that separate file has many multi-byte characters, to try to
//! encourage the compiler to trip on them.
#![crate_type="lib"]

#[path = "cross-crate-multibyte-debuginfo-comments.rs"]
mod issue_24687_mbcs_in_comments;

pub use issue_24687_mbcs_in_comments::D;
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/24687>.
//@ run-pass
//@ aux-build:issue-24687-lib.rs
//@ aux-build:cross-crate-multibyte-debuginfo.rs
//@ compile-flags:-g

extern crate issue_24687_lib as d;
extern crate cross_crate_multibyte_debuginfo as d;

fn main() {
// Create a `D`, which has a destructor whose body will be codegen'ed
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/50618>.
//! This used to ICE.

struct Point {
pub x: u64,
pub y: u64,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0560]: struct `Point` has no field named `nonexistent`
--> $DIR/issue-50618.rs:14:13
--> $DIR/fru-unknown-field-in-closure.rs:17:13
|
LL | nonexistent: 0,
| ^^^^^^^^^^^ `Point` does not have this field
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/51116>.
//! This used to leak internal `__next` ident into suggestion.

fn main() {
let tiles = Default::default();
for row in &mut tiles {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0282]: type annotations needed
--> $DIR/issue-51116.rs:5:13
--> $DIR/for-loop-nested-array-inference.rs:8:13
|
LL | *tile = 0;
| ^^^^^ cannot infer type
Expand Down

This file was deleted.

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

This file was deleted.

27 changes: 0 additions & 27 deletions tests/ui/issues/issue-67039-unsound-pin-partialeq.rs

This file was deleted.

13 changes: 0 additions & 13 deletions tests/ui/issues/issue-67039-unsound-pin-partialeq.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#![allow(unused_macros)]

// Tests that repetition matchers cannot match the empty token tree (since that would be
// ambiguous).
//! Regression test for <https://github.com/rust-lang/rust/issues/5067>.
//! Tests that repetition matchers cannot match the empty token tree (since that would be
//! ambiguous).

//@ edition:2018

#![allow(unused_macros)]

macro_rules! foo {
( $()* ) => {};
//~^ ERROR repetition matches empty token tree
Expand Down
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
error: repetition matches empty token tree
--> $DIR/issue-5067.rs:9:8
--> $DIR/repetition-matches-empty-token-tree.rs:10:8
|
LL | ( $()* ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:11:8
--> $DIR/repetition-matches-empty-token-tree.rs:12:8
|
LL | ( $()+ ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:13:8
--> $DIR/repetition-matches-empty-token-tree.rs:14:8
|
LL | ( $()? ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:18:9
--> $DIR/repetition-matches-empty-token-tree.rs:19:9
|
LL | ( [$()*] ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:20:9
--> $DIR/repetition-matches-empty-token-tree.rs:21:9
|
LL | ( [$()+] ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:22:9
--> $DIR/repetition-matches-empty-token-tree.rs:23:9
|
LL | ( [$()?] ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:27:8
--> $DIR/repetition-matches-empty-token-tree.rs:28:8
|
LL | ( $($()* $(),* $(a)* $(a),* )* ) => {};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:29:8
--> $DIR/repetition-matches-empty-token-tree.rs:30:8
|
LL | ( $($()* $(),* $(a)* $(a),* )+ ) => {};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:31:8
--> $DIR/repetition-matches-empty-token-tree.rs:32:8
|
LL | ( $($()* $(),* $(a)* $(a),* )? ) => {};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:33:8
--> $DIR/repetition-matches-empty-token-tree.rs:34:8
|
LL | ( $($()? $(),* $(a)? $(a),* )* ) => {};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:35:8
--> $DIR/repetition-matches-empty-token-tree.rs:36:8
|
LL | ( $($()? $(),* $(a)? $(a),* )+ ) => {};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:37:8
--> $DIR/repetition-matches-empty-token-tree.rs:38:8
|
LL | ( $($()? $(),* $(a)? $(a),* )? ) => {};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:47:12
--> $DIR/repetition-matches-empty-token-tree.rs:48:12
|
LL | ( $(a $()+)* ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:49:12
--> $DIR/repetition-matches-empty-token-tree.rs:50:12
|
LL | ( $(a $()*)+ ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:51:12
--> $DIR/repetition-matches-empty-token-tree.rs:52:12
|
LL | ( $(a $()+)? ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:53:12
--> $DIR/repetition-matches-empty-token-tree.rs:54:12
|
LL | ( $(a $()?)+ ) => {};
| ^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:60:18
--> $DIR/repetition-matches-empty-token-tree.rs:61:18
|
LL | (a $e1:expr $($(, a $e2:expr)*)*) => ([$e1 $($(, $e2)*)*]);
| ^^^^^^^^^^^^^^^^^^

error: repetition matches empty token tree
--> $DIR/issue-5067.rs:71:8
--> $DIR/repetition-matches-empty-token-tree.rs:72:8
|
LL | ( $()* ) => {};
| ^^
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/52262>.

#[derive(Debug)]
enum MyError {
NotFound { key: Vec<u8> },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0507]: cannot move out of `*key` which is behind a shared reference
--> $DIR/issue-52262.rs:15:35
--> $DIR/move-out-of-shared-ref-deref.rs:17:35
|
LL | String::from_utf8(*key).unwrap()
| ^^^^ move occurs because `*key` has type `Vec<u8>`, which does not implement the `Copy` trait
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/51102>.
//! Test matching non-existing fields via struct pattern syntax in closures doesn't ICE.

enum SimpleEnum {
NoState,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0026]: struct `SimpleStruct` does not have a field named `state`
--> $DIR/issue-51102.rs:13:17
--> $DIR/struct-pattern-nonexistent-field.rs:16:17
|
LL | state: 0,
| ^^^^^
Expand All @@ -8,15 +8,15 @@ LL | state: 0,
| help: `SimpleStruct` has a field named `no_state_here`

error[E0025]: field `no_state_here` bound multiple times in the pattern
--> $DIR/issue-51102.rs:24:17
--> $DIR/struct-pattern-nonexistent-field.rs:27:17
|
LL | no_state_here: 0,
| ---------------- first use of `no_state_here`
LL | no_state_here: 1
| ^^^^^^^^^^^^^^^^ multiple uses of `no_state_here` in pattern

error[E0026]: variant `SimpleEnum::NoState` does not have a field named `state`
--> $DIR/issue-51102.rs:33:17
--> $DIR/struct-pattern-nonexistent-field.rs:36:17
|
LL | state: 0
| ^^^^^ variant `SimpleEnum::NoState` does not have this field
Expand Down
10 changes: 10 additions & 0 deletions tests/ui/structs-enums/call-tuple-struct-ctor-as-fn.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/5315>.
//! Test calling tuple struct constructor doesn't cause segfault.
//@ run-pass

struct A(#[allow(dead_code)] bool);

pub fn main() {
let f = A;
f(true);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/51907>.
//! Test extern `C` trait object methods don't ICE.
//@ run-pass

trait Foo {
extern "C" fn borrow(&self);
extern "C" fn take(self: Box<Self>);
Expand Down
Loading