compiletest: Require //~
annotations even if error-pattern
is specified
This commit is contained in:
parent
b6d74b5e15
commit
4d64990690
315 changed files with 656 additions and 530 deletions
|
@ -335,6 +335,9 @@ But for strict testing, try to use the `ERROR` annotation as much as possible,
|
||||||
including `//~?` annotations for diagnostics without span.
|
including `//~?` annotations for diagnostics without span.
|
||||||
For compile time diagnostics `error-pattern` should very rarely be necessary.
|
For compile time diagnostics `error-pattern` should very rarely be necessary.
|
||||||
|
|
||||||
|
Per-line annotations (`//~`) are still checked in tests using `error-pattern`,
|
||||||
|
to opt out of these checks in exceptional cases use `//@ compile-flags: --error-format=human`.
|
||||||
|
|
||||||
### Error levels
|
### Error levels
|
||||||
|
|
||||||
The error levels that you can have are:
|
The error levels that you can have are:
|
||||||
|
|
|
@ -169,16 +169,9 @@ impl TestCx<'_> {
|
||||||
self.props.error_patterns
|
self.props.error_patterns
|
||||||
);
|
);
|
||||||
|
|
||||||
let check_patterns = should_run == WillExecute::No
|
|
||||||
&& (!self.props.error_patterns.is_empty()
|
|
||||||
|| !self.props.regex_error_patterns.is_empty());
|
|
||||||
if !explicit && self.config.compare_mode.is_none() {
|
if !explicit && self.config.compare_mode.is_none() {
|
||||||
let check_annotations = !check_patterns || !expected_errors.is_empty();
|
|
||||||
|
|
||||||
if check_annotations {
|
|
||||||
// "//~ERROR comments"
|
// "//~ERROR comments"
|
||||||
self.check_expected_errors(expected_errors, &proc_res);
|
self.check_expected_errors(expected_errors, &proc_res);
|
||||||
}
|
|
||||||
} else if explicit && !expected_errors.is_empty() {
|
} else if explicit && !expected_errors.is_empty() {
|
||||||
let msg = format!(
|
let msg = format!(
|
||||||
"line {}: cannot combine `--error-format` with {} annotations; use `error-pattern` instead",
|
"line {}: cannot combine `--error-format` with {} annotations; use `error-pattern` instead",
|
||||||
|
@ -188,7 +181,10 @@ impl TestCx<'_> {
|
||||||
self.fatal(&msg);
|
self.fatal(&msg);
|
||||||
}
|
}
|
||||||
let output_to_check = self.get_output(&proc_res);
|
let output_to_check = self.get_output(&proc_res);
|
||||||
if check_patterns {
|
if should_run == WillExecute::No
|
||||||
|
&& (!self.props.error_patterns.is_empty()
|
||||||
|
|| !self.props.regex_error_patterns.is_empty())
|
||||||
|
{
|
||||||
// "// error-pattern" comments
|
// "// error-pattern" comments
|
||||||
self.check_all_error_patterns(&output_to_check, &proc_res, pm);
|
self.check_all_error_patterns(&output_to_check, &proc_res, pm);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// test the behavior of the --no-run flag without the --test flag
|
// test the behavior of the --no-run flag without the --test flag
|
||||||
|
|
||||||
//@ compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1
|
//@ compile-flags:-Z unstable-options --no-run --test-args=--test-threads=1
|
||||||
//@ error-pattern: the `--test` flag must be passed
|
|
||||||
|
|
||||||
pub fn f() {}
|
pub fn f() {}
|
||||||
|
|
||||||
|
//~? ERROR the `--test` flag must be passed to enable `--no-run`
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
//@ compile-flags:--theme {{src-base}}/invalid-theme-name.rs
|
//@ compile-flags:--theme {{src-base}}/invalid-theme-name.rs
|
||||||
//@ error-pattern: invalid argument
|
|
||||||
//@ error-pattern: must have a .css extension
|
//@ error-pattern: must have a .css extension
|
||||||
|
|
||||||
|
//~? ERROR invalid argument: "$DIR/invalid-theme-name.rs"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
//@ compile-flags: --passes list
|
//@ compile-flags: --passes list
|
||||||
//@ error-pattern: the `passes` flag no longer functions
|
|
||||||
|
//~? WARN the `passes` flag no longer functions
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//@ error-pattern: no documentation found
|
|
||||||
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||||
#![deny(rustdoc::missing_crate_level_docs)]
|
#![deny(rustdoc::missing_crate_level_docs)]
|
||||||
//^~ NOTE defined here
|
//^~ NOTE defined here
|
||||||
|
|
||||||
pub fn foo() {}
|
pub fn foo() {}
|
||||||
|
|
||||||
|
//~? ERROR no documentation found for this crate's top-level module
|
||||||
|
|
|
@ -3,7 +3,7 @@ error: no documentation found for this crate's top-level module
|
||||||
= help: The following guide may be of use:
|
= help: The following guide may be of use:
|
||||||
https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
|
https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/no-crate-level-doc-lint.rs:3:9
|
--> $DIR/no-crate-level-doc-lint.rs:2:9
|
||||||
|
|
|
|
||||||
LL | #![deny(rustdoc::missing_crate_level_docs)]
|
LL | #![deny(rustdoc::missing_crate_level_docs)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
struct A;
|
struct A;
|
||||||
struct B;
|
struct B;
|
||||||
|
|
||||||
pub const S: A = B;
|
pub const S: A = B; //~ ERROR mismatched types
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Test that we get the following hint when trying to use a compiler crate without rustc_driver.
|
// Test that we get the following hint when trying to use a compiler crate without rustc_driver.
|
||||||
//@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
|
//@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
|
||||||
//@ compile-flags: --emit link
|
//@ compile-flags: --emit link --error-format=human
|
||||||
//@ normalize-stderr: ".*crate .* required.*\n\n" -> ""
|
//@ normalize-stderr: ".*crate .* required.*\n\n" -> ""
|
||||||
//@ normalize-stderr: "aborting due to [0-9]+" -> "aborting due to NUMBER"
|
//@ normalize-stderr: "aborting due to [0-9]+" -> "aborting due to NUMBER"
|
||||||
|
|
||||||
|
|
|
@ -23,3 +23,5 @@
|
||||||
|
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
//~? ERROR the `-Zfixed-x18` flag is not supported on the `
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//@ compile-flags: --target aarch64-unknown-none -Zsanitizer=shadow-call-stack
|
//@ compile-flags: --target aarch64-unknown-none -Zsanitizer=shadow-call-stack
|
||||||
//@ error-pattern: shadow-call-stack sanitizer is not supported for this target
|
|
||||||
//@ dont-check-compiler-stderr
|
//@ dont-check-compiler-stderr
|
||||||
//@ needs-llvm-components: aarch64
|
//@ needs-llvm-components: aarch64
|
||||||
|
|
||||||
|
@ -13,3 +12,5 @@ trait Sized {}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn foo() {}
|
pub fn foo() {}
|
||||||
|
|
||||||
|
//~? ERROR shadow-call-stack sanitizer is not supported for this target
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
//@ aux-build:system-allocator.rs
|
//@ aux-build:system-allocator.rs
|
||||||
//@ no-prefer-dynamic
|
//@ no-prefer-dynamic
|
||||||
//@ error-pattern: the `#[global_allocator]` in
|
|
||||||
|
|
||||||
extern crate system_allocator;
|
extern crate system_allocator;
|
||||||
|
|
||||||
|
@ -10,3 +9,5 @@ use std::alloc::System;
|
||||||
static A: System = System;
|
static A: System = System;
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR the `#[global_allocator]` in this crate conflicts with global allocator in: system_allocator
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
//@ aux-build:system-allocator.rs
|
//@ aux-build:system-allocator.rs
|
||||||
//@ aux-build:system-allocator2.rs
|
//@ aux-build:system-allocator2.rs
|
||||||
//@ no-prefer-dynamic
|
//@ no-prefer-dynamic
|
||||||
//@ error-pattern: the `#[global_allocator]` in
|
|
||||||
|
|
||||||
|
|
||||||
extern crate system_allocator;
|
extern crate system_allocator;
|
||||||
extern crate system_allocator2;
|
extern crate system_allocator2;
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR the `#[global_allocator]` in system_allocator conflicts with global allocator in: system_allocator2
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//@ compile-flags: --crate-type=cdylib --target=amdgcn-amd-amdhsa
|
//@ compile-flags: --crate-type=cdylib --target=amdgcn-amd-amdhsa
|
||||||
//@ needs-llvm-components: amdgpu
|
//@ needs-llvm-components: amdgpu
|
||||||
//@ needs-rust-lld
|
//@ needs-rust-lld
|
||||||
//@[nocpu] error-pattern: target requires explicitly specifying a cpu
|
|
||||||
//@[nocpu] build-fail
|
//@[nocpu] build-fail
|
||||||
//@[cpu] compile-flags: -Ctarget-cpu=gfx900
|
//@[cpu] compile-flags: -Ctarget-cpu=gfx900
|
||||||
//@[cpu] build-pass
|
//@[cpu] build-pass
|
||||||
|
@ -15,3 +14,5 @@
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
pub fn foo() {}
|
pub fn foo() {}
|
||||||
|
|
||||||
|
//[nocpu]~? ERROR target requires explicitly specifying a cpu with `-C target-cpu`
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//@ error-pattern: aborting due to 1 previous error
|
//@ error-pattern: aborting due to 1 previous error
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
2 + +2;
|
2 + +2; //~ ERROR leading `+` is not supported
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//!
|
//!
|
||||||
//! See <https://doc.rust-lang.org/reference/attributes.html>.
|
//! See <https://doc.rust-lang.org/reference/attributes.html>.
|
||||||
|
|
||||||
//@ error-pattern: expected item
|
|
||||||
|
|
||||||
#![attr = "val"]
|
#![attr = "val"]
|
||||||
#[attr = "val"] // Unterminated
|
#[attr = "val"] // Unterminated
|
||||||
|
//~^ ERROR expected item after attributes
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error: expected item after attributes
|
error: expected item after attributes
|
||||||
--> $DIR/attr-bad-crate-attr.rs:9:1
|
--> $DIR/attr-bad-crate-attr.rs:7:1
|
||||||
|
|
|
|
||||||
LL | #[attr = "val"] // Unterminated
|
LL | #[attr = "val"] // Unterminated
|
||||||
| ^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
// Show diagnostics for invalid tokens
|
// Show diagnostics for invalid tokens
|
||||||
//@ compile-flags: -Zcrate-attr=`%~@$#
|
//@ compile-flags: -Zcrate-attr=`%~@$#
|
||||||
//@ error-pattern:unknown start of token
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR unknown start of token: `
|
||||||
|
//~? ERROR expected identifier, found `%`
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
//@ compile-flags: '-Zcrate-attr=feature(yeet_expr)]fn main(){}#[inline'
|
//@ compile-flags: '-Zcrate-attr=feature(yeet_expr)]fn main(){}#[inline'
|
||||||
//@ error-pattern:unexpected closing delimiter
|
|
||||||
fn foo() {}
|
fn foo() {}
|
||||||
|
|
||||||
|
//~? ERROR unexpected closing delimiter: `]`
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//@ compile-flags: -Zcrate-attr=#![feature(foo)]
|
//@ compile-flags: -Zcrate-attr=#![feature(foo)]
|
||||||
//@ error-pattern:expected identifier
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR expected identifier, found `#`
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
//@ compile-flags: -Zcrate-attr=feature(foo),feature(bar)
|
//@ compile-flags: -Zcrate-attr=feature(foo),feature(bar)
|
||||||
//@ error-pattern:invalid crate attr
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR invalid crate attribute
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
// Show diagnostics for unbalanced parens.
|
// Show diagnostics for unbalanced parens.
|
||||||
//@ compile-flags: -Zcrate-attr=(
|
//@ compile-flags: -Zcrate-attr=(
|
||||||
//@ error-pattern:unclosed delimiter
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR this file contains an unclosed delimiter
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
//@ error-pattern:no implementation for `String ^ String`
|
|
||||||
|
|
||||||
fn main() { let x = "a".to_string() ^ "b".to_string(); }
|
fn main() { let x = "a".to_string() ^ "b".to_string(); }
|
||||||
|
//~^ ERROR no implementation for `String ^ String`
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0369]: no implementation for `String ^ String`
|
error[E0369]: no implementation for `String ^ String`
|
||||||
--> $DIR/binop-bitxor-str.rs:3:37
|
--> $DIR/binop-bitxor-str.rs:1:37
|
||||||
|
|
|
|
||||||
LL | fn main() { let x = "a".to_string() ^ "b".to_string(); }
|
LL | fn main() { let x = "a".to_string() ^ "b".to_string(); }
|
||||||
| --------------- ^ --------------- String
|
| --------------- ^ --------------- String
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
//@ error-pattern:cannot multiply `bool` by `bool`
|
fn main() { let x = true * false; } //~ ERROR cannot multiply `bool` by `bool`
|
||||||
|
|
||||||
fn main() { let x = true * false; }
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0369]: cannot multiply `bool` by `bool`
|
error[E0369]: cannot multiply `bool` by `bool`
|
||||||
--> $DIR/binop-mul-bool.rs:3:26
|
--> $DIR/binop-mul-bool.rs:1:26
|
||||||
|
|
|
|
||||||
LL | fn main() { let x = true * false; }
|
LL | fn main() { let x = true * false; }
|
||||||
| ---- ^ ----- bool
|
| ---- ^ ----- bool
|
||||||
|
|
|
@ -1,12 +1,18 @@
|
||||||
// Regression test for the ICE described in issue #86053.
|
// Regression test for the ICE described in issue #86053.
|
||||||
//@ error-pattern:unexpected `self` parameter in function
|
|
||||||
//@ error-pattern:`...` must be the last argument of a C-variadic function
|
|
||||||
//@ error-pattern:cannot find type `F` in this scope
|
|
||||||
|
|
||||||
|
|
||||||
#![feature(c_variadic)]
|
#![feature(c_variadic)]
|
||||||
#![crate_type="lib"]
|
#![crate_type="lib"]
|
||||||
|
|
||||||
fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
||||||
|
//~^ ERROR expected type, found `,`
|
||||||
|
//~| ERROR unexpected `self` parameter in function
|
||||||
|
//~| ERROR unexpected `self` parameter in function
|
||||||
|
//~| ERROR unexpected `self` parameter in function
|
||||||
self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
|
self , ... , self , self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
|
||||||
|
//~^ ERROR unexpected `self` parameter in function
|
||||||
|
//~| ERROR unexpected `self` parameter in function
|
||||||
|
//~| ERROR unexpected `self` parameter in function
|
||||||
|
//~| ERROR `...` must be the last argument of a C-variadic function
|
||||||
|
//~| ERROR only foreign, `unsafe extern "C"`, or `unsafe extern "C-unwind"` functions may have a C-variadic arg
|
||||||
|
//~| ERROR cannot find type `F` in this scope
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
error: expected type, found `,`
|
error: expected type, found `,`
|
||||||
--> $DIR/issue-86053-1.rs:10:47
|
--> $DIR/issue-86053-1.rs:6:47
|
||||||
|
|
|
|
||||||
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
||||||
| ^ expected type
|
| ^ expected type
|
||||||
|
|
||||||
error: unexpected `self` parameter in function
|
error: unexpected `self` parameter in function
|
||||||
--> $DIR/issue-86053-1.rs:10:51
|
--> $DIR/issue-86053-1.rs:6:51
|
||||||
|
|
|
|
||||||
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
||||||
| ^^^^ must be the first parameter of an associated function
|
| ^^^^ must be the first parameter of an associated function
|
||||||
|
|
||||||
error: unexpected `self` parameter in function
|
error: unexpected `self` parameter in function
|
||||||
--> $DIR/issue-86053-1.rs:10:58
|
--> $DIR/issue-86053-1.rs:6:58
|
||||||
|
|
|
|
||||||
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
||||||
| ^^^^ must be the first parameter of an associated function
|
| ^^^^ must be the first parameter of an associated function
|
||||||
|
|
||||||
error: unexpected `self` parameter in function
|
error: unexpected `self` parameter in function
|
||||||
--> $DIR/issue-86053-1.rs:10:67
|
--> $DIR/issue-86053-1.rs:6:67
|
||||||
|
|
|
|
||||||
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
LL | fn ordering4 < 'a , 'b > ( a : , self , self , self ,
|
||||||
| ^^^^ must be the first parameter of an associated function
|
| ^^^^ must be the first parameter of an associated function
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
//@ error-pattern: can't capture dynamic environment in a fn item
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let bar: isize = 5;
|
let bar: isize = 5;
|
||||||
fn foo() -> isize { return bar; }
|
fn foo() -> isize { return bar; } //~ ERROR can't capture dynamic environment in a fn item
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0434]: can't capture dynamic environment in a fn item
|
error[E0434]: can't capture dynamic environment in a fn item
|
||||||
--> $DIR/capture1.rs:5:32
|
--> $DIR/capture1.rs:3:32
|
||||||
|
|
|
|
||||||
LL | fn foo() -> isize { return bar; }
|
LL | fn foo() -> isize { return bar; }
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
//@ error-pattern: non-primitive cast: `()` as `u32`
|
fn main() { let u = (assert!(true) as u32); } //~ ERROR non-primitive cast: `()` as `u32`
|
||||||
fn main() { let u = (assert!(true) as u32); }
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0605]: non-primitive cast: `()` as `u32`
|
error[E0605]: non-primitive cast: `()` as `u32`
|
||||||
--> $DIR/cast-from-nil.rs:2:21
|
--> $DIR/cast-from-nil.rs:1:21
|
||||||
|
|
|
|
||||||
LL | fn main() { let u = (assert!(true) as u32); }
|
LL | fn main() { let u = (assert!(true) as u32); }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
|
| ^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
//@ error-pattern: non-primitive cast: `u32` as `()`
|
fn main() { let u = 0u32 as (); } //~ ERROR non-primitive cast: `u32` as `()`
|
||||||
fn main() { let u = 0u32 as (); }
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0605]: non-primitive cast: `u32` as `()`
|
error[E0605]: non-primitive cast: `u32` as `()`
|
||||||
--> $DIR/cast-to-nil.rs:2:21
|
--> $DIR/cast-to-nil.rs:1:21
|
||||||
|
|
|
|
||||||
LL | fn main() { let u = 0u32 as (); }
|
LL | fn main() { let u = 0u32 as (); }
|
||||||
| ^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
|
| ^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// Error, the linked empty library is `no_std` and doesn't provide a panic handler.
|
// Error, the linked empty library is `no_std` and doesn't provide a panic handler.
|
||||||
|
|
||||||
//@ dont-check-compiler-stderr
|
//@ dont-check-compiler-stderr
|
||||||
//@ error-pattern: `#[panic_handler]` function required, but not found
|
|
||||||
//@ aux-build: cfg_false_lib_no_std_before.rs
|
//@ aux-build: cfg_false_lib_no_std_before.rs
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
@ -9,3 +8,6 @@
|
||||||
extern crate cfg_false_lib_no_std_before as _;
|
extern crate cfg_false_lib_no_std_before as _;
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR `#[panic_handler]` function required, but not found
|
||||||
|
//~? ERROR unwinding panics are not supported without std
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//@ build-fail
|
//@ build-fail
|
||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
//@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options
|
//@ compile-flags: --crate-type=lib --target={{src-base}}/codegen/mismatched-data-layout.json -Z unstable-options
|
||||||
//@ error-pattern: differs from LLVM target's
|
|
||||||
//@ normalize-stderr: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`"
|
//@ normalize-stderr: "`, `[A-Za-z0-9-:]*`" -> "`, `normalized data layout`"
|
||||||
//@ normalize-stderr: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`"
|
//@ normalize-stderr: "layout, `[A-Za-z0-9-:]*`" -> "layout, `normalized data layout`"
|
||||||
|
|
||||||
|
@ -12,3 +11,5 @@
|
||||||
|
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
trait Sized {}
|
trait Sized {}
|
||||||
|
|
||||||
|
//~? ERROR differs from LLVM target's
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
//@ compile-flags: --cfg a::b
|
//@ compile-flags: --cfg a::b
|
||||||
//@ error-pattern: invalid `--cfg` argument: `a::b` (argument key must be an identifier)
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR invalid `--cfg` argument: `a::b` (argument key must be an identifier)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
//@ compile-flags: --cfg a=10
|
//@ compile-flags: --cfg a=10
|
||||||
//@ error-pattern: invalid `--cfg` argument: `a=10` (argument value must be a string)
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR invalid `--cfg` argument: `a=10` (argument value must be a string)
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
//@ error-pattern: `main` function not found
|
|
||||||
//@ compile-flags: --cfg foo --check-cfg=cfg(foo,bar)
|
//@ compile-flags: --cfg foo --check-cfg=cfg(foo,bar)
|
||||||
|
|
||||||
// main is conditionally compiled, but the conditional compilation
|
// main is conditionally compiled, but the conditional compilation
|
||||||
// is conditional too!
|
// is conditional too!
|
||||||
|
|
||||||
#[cfg_attr(foo, cfg(bar))]
|
#[cfg_attr(foo, cfg(bar))]
|
||||||
fn main() { }
|
fn main() { } //~ ERROR `main` function not found in crate `cfg_attr_cfg_2`
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0601]: `main` function not found in crate `cfg_attr_cfg_2`
|
error[E0601]: `main` function not found in crate `cfg_attr_cfg_2`
|
||||||
--> $DIR/cfg-attr-cfg-2.rs:8:14
|
--> $DIR/cfg-attr-cfg-2.rs:7:14
|
||||||
|
|
|
|
||||||
LL | fn main() { }
|
LL | fn main() { }
|
||||||
| ^ consider adding a `main` function to `$DIR/cfg-attr-cfg-2.rs`
|
| ^ consider adding a `main` function to `$DIR/cfg-attr-cfg-2.rs`
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
//@ error-pattern: `main` function not found
|
#![cfg(FALSE)] //~ ERROR `main` function not found in crate `cfg_in_crate_1`
|
||||||
|
|
||||||
#![cfg(FALSE)]
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0601]: `main` function not found in crate `cfg_in_crate_1`
|
error[E0601]: `main` function not found in crate `cfg_in_crate_1`
|
||||||
--> $DIR/cfg-in-crate-1.rs:3:15
|
--> $DIR/cfg-in-crate-1.rs:1:15
|
||||||
|
|
|
|
||||||
LL | #![cfg(FALSE)]
|
LL | #![cfg(FALSE)]
|
||||||
| ^ consider adding a `main` function to `$DIR/cfg-in-crate-1.rs`
|
| ^ consider adding a `main` function to `$DIR/cfg-in-crate-1.rs`
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//@ error-pattern: evaluation of constant value failed
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -8,6 +6,9 @@ fn main() {
|
||||||
const PAST_END_PTR: *const u32 = unsafe { DATA.as_ptr().add(1) };
|
const PAST_END_PTR: *const u32 = unsafe { DATA.as_ptr().add(1) };
|
||||||
|
|
||||||
const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
|
const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
|
||||||
|
//~^ ERROR evaluation of constant value failed
|
||||||
const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
|
const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
|
||||||
|
//~^ ERROR evaluation of constant value failed
|
||||||
const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
|
const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
|
||||||
|
//~^ ERROR evaluation of constant value failed
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0080]: evaluation of constant value failed
|
error[E0080]: evaluation of constant value failed
|
||||||
--> $DIR/out_of_bounds_read.rs:10:33
|
--> $DIR/out_of_bounds_read.rs:8:33
|
||||||
|
|
|
|
||||||
LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
|
LL | const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
|
| ^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
|
||||||
|
@ -8,7 +8,7 @@ note: inside `std::ptr::read::<u32>`
|
||||||
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
|
||||||
|
|
||||||
error[E0080]: evaluation of constant value failed
|
error[E0080]: evaluation of constant value failed
|
||||||
--> $DIR/out_of_bounds_read.rs:11:39
|
--> $DIR/out_of_bounds_read.rs:10:39
|
||||||
|
|
|
|
||||||
LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
|
LL | const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
|
||||||
| ^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
|
| ^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 4 bytes of memory, but got ALLOC0+0x4 which is at or beyond the end of the allocation of size 4 bytes
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//@ error-pattern: cycle detected
|
|
||||||
|
|
||||||
struct Foo {
|
struct Foo {
|
||||||
bytes: [u8; std::mem::size_of::<Foo>()]
|
bytes: [u8; std::mem::size_of::<Foo>()]
|
||||||
|
//~^ ERROR cycle detected when evaluating type-level constant
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
error[E0391]: cycle detected when evaluating type-level constant
|
error[E0391]: cycle detected when evaluating type-level constant
|
||||||
--> $DIR/const-size_of-cycle.rs:4:17
|
--> $DIR/const-size_of-cycle.rs:2:17
|
||||||
|
|
|
|
||||||
LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
|
note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
|
||||||
--> $DIR/const-size_of-cycle.rs:4:17
|
--> $DIR/const-size_of-cycle.rs:2:17
|
||||||
|
|
|
|
||||||
LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -14,7 +14,7 @@ LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
||||||
= note: ...which requires normalizing `[u8; std::mem::size_of::<Foo>()]`...
|
= note: ...which requires normalizing `[u8; std::mem::size_of::<Foo>()]`...
|
||||||
= note: ...which again requires evaluating type-level constant, completing the cycle
|
= note: ...which again requires evaluating type-level constant, completing the cycle
|
||||||
note: cycle used when checking that `Foo` is well-formed
|
note: cycle used when checking that `Foo` is well-formed
|
||||||
--> $DIR/const-size_of-cycle.rs:3:1
|
--> $DIR/const-size_of-cycle.rs:1:1
|
||||||
|
|
|
|
||||||
LL | struct Foo {
|
LL | struct Foo {
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
|
@ -14,4 +14,6 @@ static TEST_OK: () = {
|
||||||
// The actual error is tested by the error-pattern above.
|
// The actual error is tested by the error-pattern above.
|
||||||
static TEST_BAD: () = {
|
static TEST_BAD: () = {
|
||||||
let _v: Vec<i32> = Vec::new();
|
let _v: Vec<i32> = Vec::new();
|
||||||
};
|
}; //~ ERROR could not evaluate static initializer
|
||||||
|
|
||||||
|
//~? WARN skipping const checks
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//! ICE.
|
//! ICE.
|
||||||
|
|
||||||
//@ compile-flags: --crate-type=lib -Ztiny-const-eval-limit
|
//@ compile-flags: --crate-type=lib -Ztiny-const-eval-limit
|
||||||
//@ error-pattern: constant evaluation is taking a long time
|
|
||||||
|
|
||||||
static ROOK_ATTACKS_TABLE: () = {
|
static ROOK_ATTACKS_TABLE: () = {
|
||||||
0_u64.count_ones();
|
0_u64.count_ones();
|
||||||
|
@ -23,3 +22,5 @@ static ROOK_ATTACKS_TABLE: () = {
|
||||||
0_u64.count_ones();
|
0_u64.count_ones();
|
||||||
0_u64.count_ones();
|
0_u64.count_ones();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//~? ERROR constant evaluation is taking a long time
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: constant evaluation is taking a long time
|
||||||
= note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
|
= note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
|
||||||
If your compilation actually takes a long time, you can safely allow the lint.
|
If your compilation actually takes a long time, you can safely allow the lint.
|
||||||
help: the constant being evaluated
|
help: the constant being evaluated
|
||||||
--> $DIR/timeout.rs:8:1
|
--> $DIR/timeout.rs:7:1
|
||||||
|
|
|
|
||||||
LL | static ROOK_ATTACKS_TABLE: () = {
|
LL | static ROOK_ATTACKS_TABLE: () = {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//@ compile-flags: --crate-type dynlib
|
//@ compile-flags: --crate-type dynlib
|
||||||
//@ error-pattern: unknown crate type: `dynlib`, expected one of: `lib`, `rlib`, `staticlib`, `dylib`, `cdylib`, `bin`, `proc-macro`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR unknown crate type: `dynlib`
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
//~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
|
||||||
// Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
|
// Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
|
||||||
// causes a layout error. See https://github.com/rust-lang/rust/issues/94961.
|
// causes a layout error. See https://github.com/rust-lang/rust/issues/94961.
|
||||||
|
|
||||||
//@ compile-flags:-C debuginfo=2
|
//@ compile-flags:-C debuginfo=2
|
||||||
//@ build-fail
|
//@ build-fail
|
||||||
//@ error-pattern: too big for the target architecture
|
|
||||||
|
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//~ ERROR values of the type `[u8; usize::MAX]` are too big for the target architecture
|
||||||
// Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
|
// Make sure the compiler does not ICE when trying to generate the debuginfo name of a type that
|
||||||
// causes a layout error.
|
// causes a layout error.
|
||||||
// This version of the test already ICE'd before the commit that introduce the ICE described in
|
// This version of the test already ICE'd before the commit that introduce the ICE described in
|
||||||
|
@ -5,7 +6,6 @@
|
||||||
|
|
||||||
//@ compile-flags:-C debuginfo=2
|
//@ compile-flags:-C debuginfo=2
|
||||||
//@ build-fail
|
//@ build-fail
|
||||||
//@ error-pattern: too big for the target architecture
|
|
||||||
|
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
//@ revisions: zero one two three four five six
|
//@ revisions: zero one two three four five six
|
||||||
|
|
||||||
//@[zero] compile-flags: -Zdwarf-version=0
|
//@[zero] compile-flags: -Zdwarf-version=0
|
||||||
//@[zero] error-pattern: requested DWARF version 0 is not supported
|
|
||||||
|
|
||||||
//@[one] compile-flags: -Zdwarf-version=1
|
//@[one] compile-flags: -Zdwarf-version=1
|
||||||
//@[one] error-pattern: requested DWARF version 1 is not supported
|
//@[one] error-pattern: requested DWARF version 1 is not supported
|
||||||
|
@ -22,7 +21,6 @@
|
||||||
//@[five] check-pass
|
//@[five] check-pass
|
||||||
|
|
||||||
//@[six] compile-flags: -Zdwarf-version=6
|
//@[six] compile-flags: -Zdwarf-version=6
|
||||||
//@[six] error-pattern: requested DWARF version 6 is not supported
|
|
||||||
|
|
||||||
//@ compile-flags: -g --target x86_64-unknown-linux-gnu --crate-type cdylib
|
//@ compile-flags: -g --target x86_64-unknown-linux-gnu --crate-type cdylib
|
||||||
//@ needs-llvm-components: x86
|
//@ needs-llvm-components: x86
|
||||||
|
@ -36,3 +34,7 @@
|
||||||
pub trait Sized {}
|
pub trait Sized {}
|
||||||
|
|
||||||
pub fn foo() {}
|
pub fn foo() {}
|
||||||
|
|
||||||
|
//[zero]~? ERROR requested DWARF version 0 is not supported
|
||||||
|
//[one]~? ERROR requested DWARF version 1 is not supported
|
||||||
|
//[six]~? ERROR requested DWARF version 6 is not supported
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
|
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
|
||||||
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=packed
|
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=packed
|
||||||
//@ error-pattern: error: `-Csplit-debuginfo=packed` is unstable on this platform
|
|
||||||
|
|
||||||
//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
|
//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
|
||||||
//@[aarch64_gl] needs-llvm-components: aarch64
|
//@[aarch64_gl] needs-llvm-components: aarch64
|
||||||
|
@ -27,3 +26,5 @@
|
||||||
|
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
|
//~? ERROR `-Csplit-debuginfo=packed` is unstable on this platform
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
|
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
|
||||||
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=unpacked
|
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=unpacked
|
||||||
//@ error-pattern: error: `-Csplit-debuginfo=unpacked` is unstable on this platform
|
|
||||||
|
|
||||||
//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
|
//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
|
||||||
//@[aarch64_gl] needs-llvm-components: aarch64
|
//@[aarch64_gl] needs-llvm-components: aarch64
|
||||||
|
@ -27,3 +26,5 @@
|
||||||
|
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
|
//~? ERROR `-Csplit-debuginfo=unpacked` is unstable on this platform
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//@ aux-build:deprecation-lint.rs
|
//@ aux-build:deprecation-lint.rs
|
||||||
//@ error-pattern: use of deprecated function
|
|
||||||
|
|
||||||
#![deny(deprecated)]
|
#![deny(deprecated)]
|
||||||
|
|
||||||
|
@ -9,5 +8,5 @@ extern crate deprecation_lint;
|
||||||
use deprecation_lint::*;
|
use deprecation_lint::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
macro_test!();
|
macro_test!(); //~ ERROR use of deprecated function `deprecation_lint::deprecated`: text
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
error: use of deprecated function `deprecation_lint::deprecated`: text
|
error: use of deprecated function `deprecation_lint::deprecated`: text
|
||||||
--> $DIR/deprecation-lint-2.rs:12:5
|
--> $DIR/deprecation-lint-2.rs:11:5
|
||||||
|
|
|
|
||||||
LL | macro_test!();
|
LL | macro_test!();
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/deprecation-lint-2.rs:4:9
|
--> $DIR/deprecation-lint-2.rs:3:9
|
||||||
|
|
|
|
||||||
LL | #![deny(deprecated)]
|
LL | #![deny(deprecated)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//@ aux-build:deprecation-lint.rs
|
//@ aux-build:deprecation-lint.rs
|
||||||
//@ error-pattern: use of deprecated function
|
|
||||||
|
|
||||||
#![deny(deprecated)]
|
#![deny(deprecated)]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
@ -11,4 +10,5 @@ use deprecation_lint::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
macro_test_arg_nested!(deprecated_text);
|
macro_test_arg_nested!(deprecated_text);
|
||||||
|
//~^ ERROR use of deprecated function `deprecation_lint::deprecated_text`: text
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
error: use of deprecated function `deprecation_lint::deprecated_text`: text
|
error: use of deprecated function `deprecation_lint::deprecated_text`: text
|
||||||
--> $DIR/deprecation-lint-3.rs:13:28
|
--> $DIR/deprecation-lint-3.rs:12:28
|
||||||
|
|
|
|
||||||
LL | macro_test_arg_nested!(deprecated_text);
|
LL | macro_test_arg_nested!(deprecated_text);
|
||||||
| ^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/deprecation-lint-3.rs:4:9
|
--> $DIR/deprecation-lint-3.rs:3:9
|
||||||
|
|
|
|
||||||
LL | #![deny(deprecated)]
|
LL | #![deny(deprecated)]
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
//
|
|
||||||
//@ error-pattern: symbol `fail` is already defined
|
|
||||||
#![crate_type="rlib"]
|
#![crate_type="rlib"]
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
|
@ -20,5 +18,5 @@ impl A for B {
|
||||||
|
|
||||||
impl A for C {
|
impl A for C {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
fn fail(self) {}
|
fn fail(self) {} //~ ERROR symbol `fail` is already defined
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error: symbol `fail` is already defined
|
error: symbol `fail` is already defined
|
||||||
--> $DIR/dupe-symbols-4.rs:23:5
|
--> $DIR/dupe-symbols-4.rs:21:5
|
||||||
|
|
|
|
||||||
LL | fn fail(self) {}
|
LL | fn fail(self) {}
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
//@ build-fail
|
//@ build-fail
|
||||||
//@ ignore-wasi wasi does different things with the `main` symbol
|
//@ ignore-wasi wasi does different things with the `main` symbol
|
||||||
|
|
||||||
//
|
|
||||||
//@ error-pattern: entry symbol `main` declared multiple times
|
|
||||||
|
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
fn main(){}
|
fn main(){} //~ ERROR entry symbol `main` declared multiple times
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error: entry symbol `main` declared multiple times
|
error: entry symbol `main` declared multiple times
|
||||||
--> $DIR/dupe-symbols-7.rs:10:1
|
--> $DIR/dupe-symbols-7.rs:7:1
|
||||||
|
|
|
|
||||||
LL | fn main(){}
|
LL | fn main(){}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
//@ build-fail
|
//@ build-fail
|
||||||
//@ error-pattern: entry symbol `main` declared multiple times
|
|
||||||
//@ ignore-wasi wasi does different things with the `main` symbol
|
//@ ignore-wasi wasi does different things with the `main` symbol
|
||||||
//
|
//
|
||||||
// See #67946.
|
// See #67946.
|
||||||
|
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
fn main() {
|
fn main() { //~ ERROR entry symbol `main` declared multiple times
|
||||||
extern "Rust" {
|
extern "Rust" {
|
||||||
fn main();
|
fn main();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error: entry symbol `main` declared multiple times
|
error: entry symbol `main` declared multiple times
|
||||||
--> $DIR/dupe-symbols-8.rs:8:1
|
--> $DIR/dupe-symbols-8.rs:7:1
|
||||||
|
|
|
|
||||||
LL | fn main() {
|
LL | fn main() {
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
//@ error-pattern: `main` function not found
|
|
||||||
|
|
||||||
// Since we're not compiling a test runner this function should be elided
|
// Since we're not compiling a test runner this function should be elided
|
||||||
// and the build will fail because main doesn't exist
|
// and the build will fail because main doesn't exist
|
||||||
#[test]
|
#[test]
|
||||||
fn main() {
|
fn main() {
|
||||||
}
|
} //~ ERROR `main` function not found in crate `elided_test`
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0601]: `main` function not found in crate `elided_test`
|
error[E0601]: `main` function not found in crate `elided_test`
|
||||||
--> $DIR/elided-test.rs:7:2
|
--> $DIR/elided-test.rs:5:2
|
||||||
|
|
|
|
||||||
LL | }
|
LL | }
|
||||||
| ^ consider adding a `main` function to `$DIR/elided-test.rs`
|
| ^ consider adding a `main` function to `$DIR/elided-test.rs`
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
//@ compile-flags:-D bogus
|
//@ compile-flags:-D bogus
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
|
||||||
//@ error-pattern:E0602
|
|
||||||
//@ error-pattern:requested on the command line with `-D bogus`
|
//@ error-pattern:requested on the command line with `-D bogus`
|
||||||
//@ error-pattern:`#[warn(unknown_lints)]` on by default
|
//@ error-pattern:`#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? WARN unknown lint: `bogus`
|
||||||
|
//~? WARN unknown lint: `bogus`
|
||||||
|
//~? WARN unknown lint: `bogus`
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
|
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
|
||||||
--> $DIR/remap-path-prefix-reverse.rs:16:13
|
--> $DIR/remap-path-prefix-reverse.rs:16:13
|
||||||
|
|
|
|
||||||
LL | let _ = remapped_dep::SomeStruct; // ~ERROR E0423
|
LL | let _ = remapped_dep::SomeStruct;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
|
||||||
|
|
|
|
||||||
::: remapped-aux/remapped_dep.rs:4:1
|
::: remapped-aux/remapped_dep.rs:4:1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
|
error[E0423]: expected value, found struct `remapped_dep::SomeStruct`
|
||||||
--> $DIR/remap-path-prefix-reverse.rs:16:13
|
--> $DIR/remap-path-prefix-reverse.rs:16:13
|
||||||
|
|
|
|
||||||
LL | let _ = remapped_dep::SomeStruct; // ~ERROR E0423
|
LL | let _ = remapped_dep::SomeStruct;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `remapped_dep::SomeStruct {}`
|
||||||
|
|
|
|
||||||
::: remapped-aux/remapped_dep.rs:4:1
|
::: remapped-aux/remapped_dep.rs:4:1
|
||||||
|
|
|
@ -13,5 +13,6 @@ extern crate remapped_dep;
|
||||||
fn main() {
|
fn main() {
|
||||||
// The actual error is irrelevant. The important part it that is should show
|
// The actual error is irrelevant. The important part it that is should show
|
||||||
// a snippet of the dependency's source.
|
// a snippet of the dependency's source.
|
||||||
let _ = remapped_dep::SomeStruct; // ~ERROR E0423
|
let _ = remapped_dep::SomeStruct;
|
||||||
|
//~^ ERROR expected value, found struct `remapped_dep::SomeStruct`
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//@ [with-remap]compile-flags: --remap-path-prefix={{rust-src-base}}=remapped
|
//@ [with-remap]compile-flags: --remap-path-prefix={{rust-src-base}}=remapped
|
||||||
//@ [with-remap]compile-flags: --remap-path-prefix={{src-base}}=remapped-tests-ui
|
//@ [with-remap]compile-flags: --remap-path-prefix={{src-base}}=remapped-tests-ui
|
||||||
//@ [without-remap]compile-flags:
|
//@ [without-remap]compile-flags:
|
||||||
//@ error-pattern: E0507
|
|
||||||
|
|
||||||
// The $SRC_DIR*.rs:LL:COL normalisation doesn't kick in automatically
|
// The $SRC_DIR*.rs:LL:COL normalisation doesn't kick in automatically
|
||||||
// as the remapped revision will not begin with $SRC_DIR_REAL,
|
// as the remapped revision will not begin with $SRC_DIR_REAL,
|
||||||
|
@ -18,7 +17,10 @@ struct Worker {
|
||||||
impl Drop for Worker {
|
impl Drop for Worker {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.thread.join().unwrap();
|
self.thread.join().unwrap();
|
||||||
|
//[without-remap]~^ ERROR cannot move out of `self.thread` which is behind a mutable reference
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn main(){}
|
pub fn main(){}
|
||||||
|
|
||||||
|
//[with-remap]~? ERROR cannot move out of `self.thread` which is behind a mutable reference
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0425]: cannot find value `ferris` in this scope
|
error[E0425]: cannot find value `ferris` in this scope
|
||||||
--> remapped/errors/remap-path-prefix.rs:19:5
|
--> remapped/errors/remap-path-prefix.rs:15:5
|
||||||
|
|
|
|
||||||
LL | ferris
|
LL | ferris
|
||||||
| ^^^^^^ not found in this scope
|
| ^^^^^^ not found in this scope
|
||||||
|
|
|
@ -7,14 +7,13 @@
|
||||||
// The remapped paths are not normalized by compiletest.
|
// The remapped paths are not normalized by compiletest.
|
||||||
//@ normalize-stderr: "\\(errors)" -> "/$1"
|
//@ normalize-stderr: "\\(errors)" -> "/$1"
|
||||||
|
|
||||||
// The remapped paths aren't recognized by compiletest, so we
|
|
||||||
// cannot use line-specific patterns.
|
|
||||||
//@ error-pattern: E0425
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// We cannot actually put an ERROR marker here because
|
// We cannot actually put an ERROR marker here because
|
||||||
// the file name in the error message is not what the
|
// the file name in the error message is not what the
|
||||||
// test framework expects (since the filename gets remapped).
|
// test framework expects (since the filename gets remapped).
|
||||||
// We still test the expected error in the stderr file.
|
// We still test the expected error in the stderr file.
|
||||||
ferris
|
ferris //[without-diagnostic-scope]~ ERROR cannot find value `ferris` in this scope
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//[normal]~? ERROR cannot find value `ferris` in this scope
|
||||||
|
//[with-diagnostic-scope]~? ERROR cannot find value `ferris` in this scope
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0425]: cannot find value `ferris` in this scope
|
error[E0425]: cannot find value `ferris` in this scope
|
||||||
--> remapped/errors/remap-path-prefix.rs:19:5
|
--> remapped/errors/remap-path-prefix.rs:15:5
|
||||||
|
|
|
|
||||||
LL | ferris
|
LL | ferris
|
||||||
| ^^^^^^ not found in this scope
|
| ^^^^^^ not found in this scope
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0425]: cannot find value `ferris` in this scope
|
error[E0425]: cannot find value `ferris` in this scope
|
||||||
--> $DIR/remap-path-prefix.rs:19:5
|
--> $DIR/remap-path-prefix.rs:15:5
|
||||||
|
|
|
|
||||||
LL | ferris
|
LL | ferris
|
||||||
| ^^^^^^ not found in this scope
|
| ^^^^^^ not found in this scope
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
//@ error-pattern:mismatched types
|
|
||||||
// issue #513
|
// issue #513
|
||||||
|
|
||||||
fn f() { }
|
fn f() { }
|
||||||
|
@ -6,5 +5,5 @@ fn f() { }
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
||||||
// f is not a bool
|
// f is not a bool
|
||||||
if f { }
|
if f { } //~ ERROR mismatched types
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/if-typeck.rs:9:8
|
--> $DIR/if-typeck.rs:8:8
|
||||||
|
|
|
|
||||||
LL | if f { }
|
LL | if f { }
|
||||||
| ^ expected `bool`, found fn item
|
| ^ expected `bool`, found fn item
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
//@ error-pattern:cannot find macro
|
|
||||||
fn main() { iamnotanextensionthatexists!(""); }
|
fn main() { iamnotanextensionthatexists!(""); }
|
||||||
|
//~^ ERROR cannot find macro `iamnotanextensionthatexists` in this scope
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error: cannot find macro `iamnotanextensionthatexists` in this scope
|
error: cannot find macro `iamnotanextensionthatexists` in this scope
|
||||||
--> $DIR/ext-nonexistent.rs:2:13
|
--> $DIR/ext-nonexistent.rs:1:13
|
||||||
|
|
|
|
||||||
LL | fn main() { iamnotanextensionthatexists!(""); }
|
LL | fn main() { iamnotanextensionthatexists!(""); }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
|
//~ ERROR extern location for std does not exist
|
||||||
//@ compile-flags: --extern std=
|
//@ compile-flags: --extern std=
|
||||||
//@ error-pattern: extern location for std does not exist
|
|
||||||
//@ needs-unwind since it affects the error output
|
//@ needs-unwind since it affects the error output
|
||||||
//@ ignore-emscripten missing eh_catch_typeinfo lang item
|
//@ ignore-emscripten missing eh_catch_typeinfo lang item
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR `#[panic_handler]` function required, but not found
|
||||||
|
//~? ERROR unwinding panics are not supported without std
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
//@ compile-flags: --extern=my-awesome-library=libawesome.rlib
|
//@ compile-flags: --extern=my-awesome-library=libawesome.rlib
|
||||||
//@ error-pattern: crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier
|
|
||||||
//@ error-pattern: consider replacing the dashes with underscores: `my_awesome_library`
|
//@ error-pattern: consider replacing the dashes with underscores: `my_awesome_library`
|
||||||
|
|
||||||
// In a sense, this is a regression test for issue #113035. We no longer suggest
|
// In a sense, this is a regression test for issue #113035. We no longer suggest
|
||||||
|
@ -8,3 +7,5 @@
|
||||||
pub use my_awesome_library::*;
|
pub use my_awesome_library::*;
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//@ compile-flags: --extern čɍαţē=libnon_ascii.rlib
|
//@ compile-flags: --extern čɍαţē=libnon_ascii.rlib
|
||||||
//@ error-pattern: crate name `čɍαţē` passed to `--extern` is not a valid ASCII identifier
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR crate name `čɍαţē` passed to `--extern` is not a valid ASCII identifier
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
//@ compile-flags: --extern=?#1%$
|
//@ compile-flags: --extern=?#1%$
|
||||||
//@ error-pattern: crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR crate name `?#1%$` passed to `--extern` is not a valid ASCII identifier
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
//@ aux-crate:panic_handler=panic_handler.rs
|
//@ aux-crate:panic_handler=panic_handler.rs
|
||||||
//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header)
|
//@ ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header)
|
||||||
// compile_flags: -Zunstable-options --crate-type dylib
|
// compile_flags: -Zunstable-options --crate-type dylib
|
||||||
//@ error-pattern: `#[panic_handler]` function required, but not found
|
|
||||||
//@ dont-check-compiler-stderr
|
//@ dont-check-compiler-stderr
|
||||||
//@ edition: 2018
|
//@ edition: 2018
|
||||||
|
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
fn foo() {}
|
fn foo() {} //~ ERROR `main` function not found in crate `no_force_extern`
|
||||||
|
|
||||||
|
//~? ERROR `#[panic_handler]` function required, but not found
|
||||||
|
//~? ERROR unwinding panics are not supported without std
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
//@ error-pattern:mismatched types
|
fn f() -> isize { true } //~ ERROR mismatched types
|
||||||
|
|
||||||
fn f() -> isize { true }
|
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/fn-bad-block-type.rs:3:19
|
--> $DIR/fn-bad-block-type.rs:1:19
|
||||||
|
|
|
|
||||||
LL | fn f() -> isize { true }
|
LL | fn f() -> isize { true }
|
||||||
| ----- ^^^^ expected `isize`, found `bool`
|
| ----- ^^^^ expected `isize`, found `bool`
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
//@ error-pattern:import
|
|
||||||
|
|
||||||
mod a {
|
mod a {
|
||||||
pub use b::x;
|
pub use b::x;
|
||||||
}
|
}
|
||||||
|
|
||||||
mod b {
|
mod b {
|
||||||
pub use a::x;
|
pub use a::x; //~ ERROR unresolved import `a::x`
|
||||||
|
|
||||||
fn main() { let y = x; }
|
fn main() { let y = x; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0432]: unresolved import `a::x`
|
error[E0432]: unresolved import `a::x`
|
||||||
--> $DIR/import-loop-2.rs:8:13
|
--> $DIR/import-loop-2.rs:6:13
|
||||||
|
|
|
|
||||||
LL | pub use a::x;
|
LL | pub use a::x;
|
||||||
| ^^^^ no `x` in `a`
|
| ^^^^ no `x` in `a`
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
//@ error-pattern:import
|
|
||||||
|
|
||||||
use y::x;
|
use y::x;
|
||||||
|
|
||||||
mod y {
|
mod y {
|
||||||
pub use y::x;
|
pub use y::x; //~ ERROR unresolved import `y::x`
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0432]: unresolved import `y::x`
|
error[E0432]: unresolved import `y::x`
|
||||||
--> $DIR/import-loop.rs:6:13
|
--> $DIR/import-loop.rs:4:13
|
||||||
|
|
|
|
||||||
LL | pub use y::x;
|
LL | pub use y::x;
|
||||||
| ^^^^ no `x` in `y`
|
| ^^^^ no `x` in `y`
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
//@ error-pattern: unresolved
|
use main::bar; //~ ERROR unresolved import `main`
|
||||||
use main::bar;
|
|
||||||
|
|
||||||
fn main() { println!("foo"); }
|
fn main() { println!("foo"); }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0432]: unresolved import `main`
|
error[E0432]: unresolved import `main`
|
||||||
--> $DIR/import3.rs:2:5
|
--> $DIR/import3.rs:1:5
|
||||||
|
|
|
|
||||||
LL | use main::bar;
|
LL | use main::bar;
|
||||||
| ^^^^ use of unresolved module or unlinked crate `main`
|
| ^^^^ use of unresolved module or unlinked crate `main`
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
//@ error-pattern: import
|
|
||||||
|
|
||||||
|
|
||||||
mod a { pub use b::foo; }
|
mod a { pub use b::foo; }
|
||||||
mod b { pub use a::foo; }
|
mod b { pub use a::foo; } //~ ERROR unresolved import `a::foo`
|
||||||
|
|
||||||
fn main() { println!("loop"); }
|
fn main() { println!("loop"); }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0432]: unresolved import `a::foo`
|
error[E0432]: unresolved import `a::foo`
|
||||||
--> $DIR/import4.rs:5:17
|
--> $DIR/import4.rs:2:17
|
||||||
|
|
|
|
||||||
LL | mod b { pub use a::foo; }
|
LL | mod b { pub use a::foo; }
|
||||||
| ^^^^^^ no `foo` in `a`
|
| ^^^^^^ no `foo` in `a`
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
|
//~ ERROR reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper
|
||||||
//@ build-fail
|
//@ build-fail
|
||||||
|
|
||||||
//@ error-pattern: reached the recursion limit while instantiating
|
|
||||||
//@ error-pattern: reached the recursion limit finding the struct tail
|
|
||||||
|
|
||||||
// Regression test for #114484: This used to ICE during monomorphization, because we treated
|
// Regression test for #114484: This used to ICE during monomorphization, because we treated
|
||||||
// `<VirtualWrapper<...> as Pointee>::Metadata` as a rigid projection after reaching the recursion
|
// `<VirtualWrapper<...> as Pointee>::Metadata` as a rigid projection after reaching the recursion
|
||||||
// limit when finding the struct tail.
|
// limit when finding the struct tail.
|
||||||
|
@ -73,3 +71,16 @@ fn main() {
|
||||||
let test = SomeData([0; 256]);
|
let test = SomeData([0; 256]);
|
||||||
test.virtualize();
|
test.virtualize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `[u8; 256]`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `SomeData<256>`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
|
||||||
|
//~? ERROR reached the recursion limit finding the struct tail for `VirtualWrapper<SomeData<256>, 0>`
|
||||||
|
|
|
@ -18,7 +18,7 @@ error: reached the recursion limit finding the struct tail for `[u8; 256]`
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
|
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
|
||||||
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
|
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
|
||||||
|
|
|
|
||||||
LL | unsafe { virtualize_my_trait(L, self) }
|
LL | unsafe { virtualize_my_trait(L, self) }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -43,7 +43,7 @@ error: reached the recursion limit finding the struct tail for `SomeData<256>`
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
|
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
|
||||||
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
|
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
|
||||||
|
|
|
|
||||||
LL | unsafe { virtualize_my_trait(L, self) }
|
LL | unsafe { virtualize_my_trait(L, self) }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -68,7 +68,7 @@ error: reached the recursion limit finding the struct tail for `VirtualWrapper<S
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
|
note: the above error was encountered while instantiating `fn virtualize_my_trait::<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<SomeData<256>, 0>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>, 1>>`
|
||||||
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:26:18
|
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:24:18
|
||||||
|
|
|
|
||||||
LL | unsafe { virtualize_my_trait(L, self) }
|
LL | unsafe { virtualize_my_trait(L, self) }
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -76,7 +76,7 @@ LL | unsafe { virtualize_my_trait(L, self) }
|
||||||
error: reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<..., 1>, 1>, 1>, 1>, 1> as MyTrait>::virtualize`
|
error: reached the recursion limit while instantiating `<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<VirtualWrapper<..., 1>, 1>, 1>, 1>, 1> as MyTrait>::virtualize`
|
||||||
|
|
|
|
||||||
note: `<VirtualWrapper<T, L> as MyTrait>::virtualize` defined here
|
note: `<VirtualWrapper<T, L> as MyTrait>::virtualize` defined here
|
||||||
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:25:5
|
--> $DIR/infinite-instantiation-struct-tail-ice-114484.rs:23:5
|
||||||
|
|
|
|
||||||
LL | fn virtualize(&self) -> &dyn MyTrait {
|
LL | fn virtualize(&self) -> &dyn MyTrait {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
//@ needs-xray
|
//@ needs-xray
|
||||||
//@ compile-flags: -Z instrument-xray=always,never
|
//@ compile-flags: -Z instrument-xray=always,never
|
||||||
//@ error-pattern: incorrect value `always,never` for unstable option `instrument-xray`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR incorrect value `always,never` for unstable option `instrument-xray`
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
//@ needs-xray
|
//@ needs-xray
|
||||||
//@ compile-flags: -Z instrument-xray=always,always
|
//@ compile-flags: -Z instrument-xray=always,always
|
||||||
//@ error-pattern: incorrect value `always,always` for unstable option `instrument-xray`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR incorrect value `always,always` for unstable option `instrument-xray`
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
//@ needs-xray
|
//@ needs-xray
|
||||||
//@ compile-flags: -Z instrument-xray=ignore-loops,ignore-loops
|
//@ compile-flags: -Z instrument-xray=ignore-loops,ignore-loops
|
||||||
//@ error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
||||||
|
//~? ERROR incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray`
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue