mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
rustfmt tests/rustdoc-json/
.
This commit is contained in:
parent
c6fb703c05
commit
9f16362ab4
@ -19,7 +19,6 @@ ignore = [
|
||||
"/tests/run-make/translation/test.rs", # This test contains syntax errors.
|
||||
"/tests/rustdoc/", # Some have syntax errors, some are whitespace-sensitive.
|
||||
"/tests/rustdoc-gui/", # Some tests are sensitive to source code layout.
|
||||
"/tests/rustdoc-json/",
|
||||
"/tests/rustdoc-js-std/",
|
||||
"/tests/rustdoc-ui/",
|
||||
"/tests/ui/",
|
||||
|
@ -23,9 +23,5 @@
|
||||
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.type.primitive" \"str\"
|
||||
|
||||
pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str {
|
||||
if l.len() > r.len() {
|
||||
l
|
||||
} else {
|
||||
r
|
||||
}
|
||||
if l.len() > r.len() { l } else { r }
|
||||
}
|
||||
|
@ -12,4 +12,8 @@ pub struct Wrapper<T_>(std::marker::PhantomData<T_>);
|
||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }'
|
||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[1].name" \"T\"
|
||||
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates[0].bound_predicate.generic_params[1].kind" '{ "type": { "bounds": [], "default": null, "synthetic": false } }'
|
||||
pub fn foo() where for<'a, T> &'a Wrapper<T>: Trait {}
|
||||
pub fn foo()
|
||||
where
|
||||
for<'a, T> &'a Wrapper<T>: Trait,
|
||||
{
|
||||
}
|
||||
|
@ -16,12 +16,19 @@ pub trait Trait<T> {
|
||||
fn handle(value: T) -> Self;
|
||||
}
|
||||
|
||||
impl<T, U> Trait<U> for T where T: From<U> {
|
||||
fn handle(_: U) -> Self { unimplemented!() }
|
||||
impl<T, U> Trait<U> for T
|
||||
where
|
||||
T: From<U>,
|
||||
{
|
||||
fn handle(_: U) -> Self {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, R> Trait<&'a mut Events<R>> for Other {
|
||||
fn handle(_: &'a mut Events<R>) -> Self { unimplemented!() }
|
||||
fn handle(_: &'a mut Events<R>) -> Self {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
fn this_compiles<'a, R>(value: &'a mut Events<R>) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#![feature(extern_types)]
|
||||
|
||||
extern {
|
||||
extern "C" {
|
||||
/// No inner information
|
||||
pub type Foo;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// @has "$.index[*][?(@.name=='Ux')].inner.union"
|
||||
pub union Ux {
|
||||
a: u32,
|
||||
b: u64
|
||||
b: u64,
|
||||
}
|
||||
|
||||
// @is "$.index[*][?(@.name=='Num')].visibility" \"public\"
|
||||
|
@ -7,7 +7,6 @@ pub union Union {
|
||||
float: f32,
|
||||
}
|
||||
|
||||
|
||||
// @has "$.index[*][?(@.name=='make_int_union')].inner.function.decl.output.resolved_path"
|
||||
// @is "$.index[*][?(@.name=='make_int_union')].inner.function.decl.output.resolved_path.id" $Union
|
||||
pub fn make_int_union(int: i32) -> Union {
|
||||
|
Loading…
Reference in New Issue
Block a user