diff options
Diffstat (limited to 'tests/ui/methods')
23 files changed, 62 insertions, 62 deletions
diff --git a/tests/ui/methods/call_method_unknown_pointee.rs b/tests/ui/methods/call_method_unknown_pointee.rs index fe4275f5367..1643b6bfa18 100644 --- a/tests/ui/methods/call_method_unknown_pointee.rs +++ b/tests/ui/methods/call_method_unknown_pointee.rs @@ -1,4 +1,4 @@ -// edition: 2018 +//@ edition: 2018 // tests that the pointee type of a raw pointer must be known to call methods on it // see also: `tests/ui/editions/edition-raw-pointer-method-2018.rs` diff --git a/tests/ui/methods/inherent-bound-in-probe.rs b/tests/ui/methods/inherent-bound-in-probe.rs index 81a99ca010e..265ef93425a 100644 --- a/tests/ui/methods/inherent-bound-in-probe.rs +++ b/tests/ui/methods/inherent-bound-in-probe.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" +//@ normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // Fixes #110131 // diff --git a/tests/ui/methods/method-ambig-two-traits-cross-crate.rs b/tests/ui/methods/method-ambig-two-traits-cross-crate.rs index 006e315b02c..d058c2da6f2 100644 --- a/tests/ui/methods/method-ambig-two-traits-cross-crate.rs +++ b/tests/ui/methods/method-ambig-two-traits-cross-crate.rs @@ -1,7 +1,7 @@ // Test an ambiguity scenario where one copy of the method is available // from a trait imported from another crate. -// aux-build:ambig_impl_2_lib.rs +//@ aux-build:ambig_impl_2_lib.rs extern crate ambig_impl_2_lib; use ambig_impl_2_lib::Me; trait Me2 { diff --git a/tests/ui/methods/method-argument-inference-associated-type.rs b/tests/ui/methods/method-argument-inference-associated-type.rs index 852747d06b5..a9d2bb6df8e 100644 --- a/tests/ui/methods/method-argument-inference-associated-type.rs +++ b/tests/ui/methods/method-argument-inference-associated-type.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub struct ClientMap; pub struct ClientMap2; diff --git a/tests/ui/methods/method-call-lifetime-args-subst-index.rs b/tests/ui/methods/method-call-lifetime-args-subst-index.rs index 8df58a3486e..9f323a8f77d 100644 --- a/tests/ui/methods/method-call-lifetime-args-subst-index.rs +++ b/tests/ui/methods/method-call-lifetime-args-subst-index.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) #![allow(unused)] struct S; diff --git a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs index f2ace32c6b6..8721dd85ac7 100644 --- a/tests/ui/methods/method-early-bound-lifetimes-on-self.rs +++ b/tests/ui/methods/method-early-bound-lifetimes-on-self.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Check that we successfully handle methods where the `self` type has // an early-bound lifetime. Issue #18208. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![allow(dead_code)] diff --git a/tests/ui/methods/method-lookup-order.rs b/tests/ui/methods/method-lookup-order.rs index 5a46cf35dec..08ad6483d08 100644 --- a/tests/ui/methods/method-lookup-order.rs +++ b/tests/ui/methods/method-lookup-order.rs @@ -1,6 +1,6 @@ // ignore-tidy-linelength -// run-pass +//@ run-pass #![allow(dead_code)] // There are five cfg's below. I explored the set of all non-empty combinations @@ -16,39 +16,39 @@ // {bar_for_foo, valbar_for_et_foo}: these are higher precedent than the `&mut self` method on `Foo`, and so no case matching bx1x1x is included. // {mutbar_for_foo, valbar_for_etmut_foo} (which are lower precedent than the inherent `&mut self` method on `Foo`; e.g. b10101 *is* included. -// revisions: b00001 b00010 b00011 b00100 b00101 b00110 b00111 b01000 b01001 b01100 b01101 b10000 b10001 b10010 b10011 b10101 b10111 b11000 b11001 b11101 - -//[b00001]compile-flags: --cfg inherent_mut -//[b00010]compile-flags: --cfg bar_for_foo -//[b00011]compile-flags: --cfg inherent_mut --cfg bar_for_foo -//[b00100]compile-flags: --cfg mutbar_for_foo -//[b00101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo -//[b00110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo -//[b00111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo -//[b01000]compile-flags: --cfg valbar_for_et_foo -//[b01001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo -//[b01010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo -//[b01011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo -//[b01100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b01111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo -//[b10000]compile-flags: --cfg valbar_for_etmut_foo -//[b10001]compile-flags: --cfg inherent_mut --cfg valbar_for_etmut_foo -//[b10010]compile-flags: --cfg bar_for_foo --cfg valbar_for_etmut_foo -//[b10011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_etmut_foo -//[b10100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b10111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo -//[b11000]compile-flags: --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo -//[b11111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@ revisions: b00001 b00010 b00011 b00100 b00101 b00110 b00111 b01000 b01001 b01100 b01101 b10000 b10001 b10010 b10011 b10101 b10111 b11000 b11001 b11101 + +//@[b00001]compile-flags: --cfg inherent_mut +//@[b00010]compile-flags: --cfg bar_for_foo +//@[b00011]compile-flags: --cfg inherent_mut --cfg bar_for_foo +//@[b00100]compile-flags: --cfg mutbar_for_foo +//@[b00101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo +//@[b00110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo +//@[b00111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo +//@[b01000]compile-flags: --cfg valbar_for_et_foo +//@[b01001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo +//@[b01010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo +//@[b01011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo +//@[b01100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b01111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo +//@[b10000]compile-flags: --cfg valbar_for_etmut_foo +//@[b10001]compile-flags: --cfg inherent_mut --cfg valbar_for_etmut_foo +//@[b10010]compile-flags: --cfg bar_for_foo --cfg valbar_for_etmut_foo +//@[b10011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_etmut_foo +//@[b10100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b10111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_etmut_foo +//@[b11000]compile-flags: --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11001]compile-flags: --cfg inherent_mut --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11010]compile-flags: --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11011]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11100]compile-flags: --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11101]compile-flags: --cfg inherent_mut --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11110]compile-flags: --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo +//@[b11111]compile-flags: --cfg inherent_mut --cfg bar_for_foo --cfg mutbar_for_foo --cfg valbar_for_et_foo --cfg valbar_for_etmut_foo struct Foo {} diff --git a/tests/ui/methods/method-macro-backtrace.rs b/tests/ui/methods/method-macro-backtrace.rs index 00fe32b7c15..10d7c8cfda0 100644 --- a/tests/ui/methods/method-macro-backtrace.rs +++ b/tests/ui/methods/method-macro-backtrace.rs @@ -1,4 +1,4 @@ -// forbid-output: in this expansion of +//@ forbid-output: in this expansion of macro_rules! make_method { ($name:ident) => ( fn $name(&self) { } ) diff --git a/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs b/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs index daff037b27b..c3454b38b45 100644 --- a/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs +++ b/tests/ui/methods/method-mut-self-modifies-mut-slice-lvalue.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that an `&mut self` method, when invoked on a place whose // type is `&mut [u8]`, passes in a pointer to the place and not a // temporary. Issue #19147. diff --git a/tests/ui/methods/method-normalize-bounds-issue-20604.rs b/tests/ui/methods/method-normalize-bounds-issue-20604.rs index 9c0b952849e..b3979e75b61 100644 --- a/tests/ui/methods/method-normalize-bounds-issue-20604.rs +++ b/tests/ui/methods/method-normalize-bounds-issue-20604.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unused_variables)] #![allow(stable_features)] @@ -9,7 +9,7 @@ // winnowing stage of method resolution failed to handle an associated // type projection. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 #![feature(associated_types)] diff --git a/tests/ui/methods/method-on-ambiguous-numeric-type.rs b/tests/ui/methods/method-on-ambiguous-numeric-type.rs index f42b72e9f9c..4d7d86bd354 100644 --- a/tests/ui/methods/method-on-ambiguous-numeric-type.rs +++ b/tests/ui/methods/method-on-ambiguous-numeric-type.rs @@ -1,4 +1,4 @@ -// aux-build:macro-in-other-crate.rs +//@ aux-build:macro-in-other-crate.rs #[macro_use] extern crate macro_in_other_crate; diff --git a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs index 787191a26fb..b2765c4764a 100644 --- a/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs +++ b/tests/ui/methods/method-probe-no-guessing-dyn-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that method matching does not make "guesses" depending on // Deref impls that don't eventually end up being picked. diff --git a/tests/ui/methods/method-projection.rs b/tests/ui/methods/method-projection.rs index 21d983f192a..1e1090d6955 100644 --- a/tests/ui/methods/method-projection.rs +++ b/tests/ui/methods/method-projection.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can use method notation to call methods based on a // projection bound from a trait. Issue #20469. diff --git a/tests/ui/methods/method-recursive-blanket-impl.rs b/tests/ui/methods/method-recursive-blanket-impl.rs index e7e83cbec77..09bbfffcd55 100644 --- a/tests/ui/methods/method-recursive-blanket-impl.rs +++ b/tests/ui/methods/method-recursive-blanket-impl.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_variables)] #![allow(unused_imports)] // Test that we don't trigger on the blanket impl for all `&'a T` but @@ -6,7 +6,7 @@ // know not to stop at the blanket, we have to recursively evaluate // the `T:Foo` bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use std::marker::Sized; diff --git a/tests/ui/methods/method-self-arg-aux1.rs b/tests/ui/methods/method-self-arg-aux1.rs index 79b70a17ca1..a0c0a4e0541 100644 --- a/tests/ui/methods/method-self-arg-aux1.rs +++ b/tests/ui/methods/method-self-arg-aux1.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument (cross-crate) -// aux-build:method_self_arg1.rs +//@ aux-build:method_self_arg1.rs extern crate method_self_arg1; use method_self_arg1::Foo; diff --git a/tests/ui/methods/method-self-arg-aux2.rs b/tests/ui/methods/method-self-arg-aux2.rs index 16487b54f17..d8b0d847d74 100644 --- a/tests/ui/methods/method-self-arg-aux2.rs +++ b/tests/ui/methods/method-self-arg-aux2.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument (cross-crate) -// aux-build:method_self_arg2.rs +//@ aux-build:method_self_arg2.rs extern crate method_self_arg2; use method_self_arg2::{Foo, Bar}; diff --git a/tests/ui/methods/method-self-arg-trait.rs b/tests/ui/methods/method-self-arg-trait.rs index ffa7a552b25..63594380753 100644 --- a/tests/ui/methods/method-self-arg-trait.rs +++ b/tests/ui/methods/method-self-arg-trait.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument static mut COUNT: u64 = 1; diff --git a/tests/ui/methods/method-self-arg.rs b/tests/ui/methods/method-self-arg.rs index f738fa19c85..d26b9663fd0 100644 --- a/tests/ui/methods/method-self-arg.rs +++ b/tests/ui/methods/method-self-arg.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test method calls with self as an argument static mut COUNT: usize = 1; diff --git a/tests/ui/methods/method-trait-object-with-hrtb.rs b/tests/ui/methods/method-trait-object-with-hrtb.rs index d1bee676c2f..f22e93ec245 100644 --- a/tests/ui/methods/method-trait-object-with-hrtb.rs +++ b/tests/ui/methods/method-trait-object-with-hrtb.rs @@ -1,4 +1,4 @@ -// build-pass (FIXME(62277): could be check-pass?) +//@ build-pass (FIXME(62277): could be check-pass?) // Check that method probing ObjectCandidate works in the presence of // auto traits and/or HRTBs. diff --git a/tests/ui/methods/method-two-trait-defer-resolution-1.rs b/tests/ui/methods/method-two-trait-defer-resolution-1.rs index b768620cd3a..9130caccdf7 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-1.rs +++ b/tests/ui/methods/method-two-trait-defer-resolution-1.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] // Test that we pick which version of `foo` to run based on the diff --git a/tests/ui/methods/method-two-trait-defer-resolution-2.rs b/tests/ui/methods/method-two-trait-defer-resolution-2.rs index d6076126732..a022fae922e 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-2.rs +++ b/tests/ui/methods/method-two-trait-defer-resolution-2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that when we write `x.foo()`, we do not have to know the // complete type of `x` in order to type-check the method call. In // this case, we know that `x: Vec<_1>`, but we don't know what type diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs index 2fd6c3bfab8..373439d2559 100644 --- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs +++ b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.rs @@ -1,8 +1,8 @@ -// run-pass +//@ run-pass // Test that we select between traits A and B. To do that, we must // consider the `Sized` bound. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait A { //~ WARN trait `A` is never used fn foo(self); diff --git a/tests/ui/methods/method-where-clause.rs b/tests/ui/methods/method-where-clause.rs index 01692abf9b6..c9855b63d1a 100644 --- a/tests/ui/methods/method-where-clause.rs +++ b/tests/ui/methods/method-where-clause.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can use method notation to call methods based on a // where clause type, and not only type parameters. |
