Bless all pretty printer tests and ui tests
This commit is contained in:
parent
8ac05b9766
commit
402f322940
19 changed files with 210 additions and 234 deletions
|
@ -17,8 +17,8 @@ pub fn bar() ({
|
|||
let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);
|
||||
|
||||
let _ =
|
||||
(((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])
|
||||
as &[i32; 3]) as *const _ as *const [i32; 3]) as
|
||||
(((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3]) as
|
||||
&[i32; 3]) as *const _ as *const [i32; 3]) as
|
||||
*const [i32; (3 as usize)] as *const [i32; 3]);
|
||||
|
||||
|
||||
|
@ -35,20 +35,10 @@ pub fn bar() ({
|
|||
for<'r> fn(Arguments<'r>) -> String {format})(((::core::fmt::Arguments::new_v1
|
||||
as
|
||||
fn(&[&'static str], &[ArgumentV1]) -> Arguments {Arguments::new_v1})((&([("test"
|
||||
as
|
||||
&str)]
|
||||
as
|
||||
[&str; 1])
|
||||
as
|
||||
as &str)] as [&str; 1]) as
|
||||
&[&str; 1]),
|
||||
(&([]
|
||||
as
|
||||
[ArgumentV1; 0])
|
||||
as
|
||||
&[ArgumentV1; 0]))
|
||||
as
|
||||
Arguments))
|
||||
as String);
|
||||
(&([] as [ArgumentV1; 0]) as &[ArgumentV1; 0])) as
|
||||
Arguments)) as String);
|
||||
(res as String)
|
||||
} as String);
|
||||
} as ())
|
||||
|
@ -62,17 +52,7 @@ pub fn id<T>(x: T) -> T ({ (x as T) } as T)
|
|||
pub fn use_id() ({
|
||||
let _ =
|
||||
((id::<[i32; (3 as usize)]> as
|
||||
fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1
|
||||
as
|
||||
i32),
|
||||
(2
|
||||
as
|
||||
i32),
|
||||
(3
|
||||
as
|
||||
i32)]
|
||||
as
|
||||
[i32; 3]))
|
||||
as [i32; 3]);
|
||||
fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1 as i32),
|
||||
(2 as i32), (3 as i32)] as [i32; 3])) as [i32; 3]);
|
||||
} as ())
|
||||
fn main() ({ } as ())
|
||||
|
|
|
@ -12,8 +12,6 @@ pub fn main() ({
|
|||
()) else if (let Some(a) =
|
||||
((Some as
|
||||
fn(i32) -> Option<i32> {Option::<i32>::Some})((3
|
||||
as
|
||||
i32))
|
||||
as Option<i32>) as bool)
|
||||
({ } as ()) as ())
|
||||
as i32)) as Option<i32>) as bool) ({ } as ())
|
||||
as ())
|
||||
} as ())
|
||||
|
|
|
@ -8,11 +8,11 @@ struct Foo < #[cfg(FALSE)] A, B >
|
|||
#[cfg(FALSE)] struct Bar ; #[cfg(not(FALSE))] struct Inner ;
|
||||
#[cfg(FALSE)] let a = 25 ; match true
|
||||
{
|
||||
#[cfg(FALSE)] true => {},
|
||||
#[cfg_attr(not(FALSE), allow(warnings))] false => {}, _ => {}
|
||||
#[cfg(FALSE)] true => {}, #[cfg_attr(not(FALSE), allow(warnings))]
|
||||
false => {}, _ => {}
|
||||
} ; #[print_helper(should_be_removed)] fn removed_fn()
|
||||
{ #! [cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn
|
||||
kept_fn() { #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
|
||||
{ #! [cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn()
|
||||
{ #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
|
||||
{
|
||||
Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
|
||||
#[cfg(FALSE)] String, u8)
|
||||
|
|
|
@ -29,9 +29,7 @@ fn main() {
|
|||
"\"world\"".parse::<crate::TokenStream>().unwrap().into_iter();
|
||||
if let (Some(crate::TokenTree::Literal(mut lit)),
|
||||
None) =
|
||||
(iter.next(),
|
||||
iter.next())
|
||||
{
|
||||
(iter.next(), iter.next()) {
|
||||
lit.set_span(crate::Span::recover_proc_macro_span(2));
|
||||
lit
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue