rustdoc: {Meta,Pointee,}Sized in non-minicore
Some rustdoc tests are `no_core` and need to have `MetaSized` and `PointeeSized` added to them.
This commit is contained in:
parent
2f8e760031
commit
da47753496
16 changed files with 109 additions and 21 deletions
|
|
@ -1,8 +1,14 @@
|
|||
#![feature(no_core, auto_traits, lang_items, arbitrary_self_types)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "legacy_receiver"]
|
||||
pub trait LegacyReceiver {}
|
||||
|
|
@ -15,8 +21,8 @@ impl Foo {
|
|||
}
|
||||
|
||||
// Testing spans, so all tests below code
|
||||
//@ is "$.index[?(@.docs=='has span')].span.begin" "[13, 1]"
|
||||
//@ is "$.index[?(@.docs=='has span')].span.end" "[15, 2]"
|
||||
//@ is "$.index[?(@.docs=='has span')].span.begin" "[19, 1]"
|
||||
//@ is "$.index[?(@.docs=='has span')].span.end" "[21, 2]"
|
||||
//@ is "$.index[?(@.docs=='has span')].inner.impl.is_synthetic" false
|
||||
//@ is "$.index[?(@.inner.impl.is_synthetic==true)].span" null
|
||||
//@ is "$.index[?(@.inner.impl.is_synthetic==true)].inner.impl.for.resolved_path.path" '"Foo"'
|
||||
|
|
|
|||
|
|
@ -6,8 +6,14 @@
|
|||
|
||||
//@ set impl_i32 = "$.index[?(@.docs=='Only core can do this')].id"
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
/// Only core can do this
|
||||
impl i32 {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
/// ```{class="}
|
||||
/// main;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: unclosed quote string `"`
|
||||
--> $DIR/custom_code_classes_in_docs-warning3.rs:11:1
|
||||
--> $DIR/custom_code_classes_in_docs-warning3.rs:17:1
|
||||
|
|
||||
LL | / /// ```{class="}
|
||||
LL | | /// main;
|
||||
|
|
@ -17,7 +17,7 @@ LL | #![deny(warnings)]
|
|||
= note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(warnings)]`
|
||||
|
||||
error: unclosed quote string `"`
|
||||
--> $DIR/custom_code_classes_in_docs-warning3.rs:11:1
|
||||
--> $DIR/custom_code_classes_in_docs-warning3.rs:17:1
|
||||
|
|
||||
LL | / /// ```{class="}
|
||||
LL | | /// main;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,14 @@
|
|||
#![feature(arm_target_feature)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// `fp-armv8` is "forbidden" on aarch64 as we tie it to `neon`.
|
||||
#[target_feature(enable = "fp-armv8")]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,20 @@
|
|||
// https://github.com/rust-lang/rust/issues/111249
|
||||
#![crate_name = "foo"]
|
||||
#![feature(no_core)]
|
||||
#![feature(lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//@ files "foo" "['all.html', 'visible', 'index.html', 'sidebar-items.js', 'hidden', \
|
||||
// 'struct.Bar.html']"
|
||||
// 'struct.Bar.html', 'trait.Sized.html', 'trait.MetaSized.html', 'trait.PointeeSized.html']"
|
||||
//@ files "foo/visible" "['trait.Foo.html', 'index.html', 'sidebar-items.js']"
|
||||
//@ files "foo/hidden" "['inner']"
|
||||
//@ files "foo/hidden/inner" "['trait.Foo.html']"
|
||||
|
|
|
|||
|
|
@ -13,8 +13,14 @@ impl char {
|
|||
}
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "clone"]
|
||||
pub trait Clone: Sized {}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ extern {
|
|||
pub type ExternType;
|
||||
}
|
||||
|
||||
pub trait T {
|
||||
pub trait T: std::marker::PointeeSized {
|
||||
fn test(&self) {}
|
||||
}
|
||||
|
||||
pub trait G<N> {
|
||||
pub trait G<N>: std::marker::PointeeSized {
|
||||
fn g(&self, n: N) {}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,14 @@
|
|||
//@ has no_doc_primitive/index.html
|
||||
//! A [`char`] and its [`char::len_utf8`].
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
impl char {
|
||||
pub fn len_utf8(self) -> usize {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,14 @@ impl char {
|
|||
}
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "clone"]
|
||||
pub trait Clone: Sized {}
|
||||
|
|
|
|||
|
|
@ -37,5 +37,11 @@ impl S {
|
|||
pub fn f() {}
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,14 @@ impl<T> Box<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[doc(notable_trait)]
|
||||
pub trait FakeIterator {}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
extern crate primitive_doc;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,14 @@
|
|||
#![crate_name = "foo"]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//@ has 'foo/index.html'
|
||||
//@ has - '//dt/*[@class="stab portability"]' 'foobar'
|
||||
|
|
|
|||
|
|
@ -3,11 +3,17 @@
|
|||
#![no_core]
|
||||
#![crate_name = "foo"]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//@ files "foo" "['sidebar-items.js', 'all.html', 'hidden', 'index.html', 'struct.Bar.html', \
|
||||
// 'visible']"
|
||||
// 'visible', 'trait.Sized.html', 'trait.MetaSized.html', 'trait.PointeeSized.html']"
|
||||
//@ files "foo/hidden" "['inner']"
|
||||
//@ files "foo/hidden/inner" "['trait.Foo.html']"
|
||||
//@ files "foo/visible" "['index.html', 'sidebar-items.js', 'trait.Foo.html']"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,14 @@
|
|||
#![no_core]
|
||||
#![crate_name = "foo"]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//@ has 'foo/fn.abort.html'
|
||||
//@ has - '//pre[@class="rust item-decl"]' 'pub fn abort() -> !'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue