Rollup merge of #136274 - compiler-errors:sized-wf, r=lcnr

Check Sizedness of return type in WF

Still need to clean this up a bit. This should fix https://github.com/rust-lang/trait-system-refactor-initiative/issues/150.

r? lcnr
This commit is contained in:
Matthias Krüger 2025-02-04 18:49:37 +01:00 committed by GitHub
commit a8ecb79d19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 610 additions and 530 deletions

View file

@ -1,9 +1,12 @@
#![feature(doc_cfg)]
#![feature(no_core)]
#![feature(no_core, lang_items)]
#![crate_name = "foo"]
#![no_core]
#[lang = "sized"]
trait Sized {}
//@ has 'foo/index.html'
//@ has - '//dt/*[@class="stab portability"]' 'foobar'
//@ has - '//dt/*[@class="stab portability"]' 'bar'

View file

@ -2,9 +2,12 @@
//@ compile-flags: --extern-html-root-url=primitive_doc=../ -Z unstable-options
//@ only-linux
#![feature(no_core)]
#![feature(no_core, lang_items)]
#![no_core]
#[lang = "sized"]
trait Sized {}
extern crate primitive_doc;
//@ has 'cross_crate_primitive_doc/fn.foo.html' '//a[@href="../primitive_doc/primitive.usize.html"]' 'usize'

View file

@ -6,8 +6,13 @@
#![rustc_coherence_is_core]
#![crate_type = "rlib"]
//@ has no_doc_primitive/index.html
//! A [`char`] and its [`char::len_utf8`].
#[lang = "sized"]
trait Sized {}
impl char {
pub fn len_utf8(self) -> usize {
42

View file

@ -1,8 +1,11 @@
// Regression test for <https://github.com/rust-lang/rust/issues/111064>.
#![feature(no_core)]
#![feature(no_core, lang_items)]
#![no_core]
#![crate_name = "foo"]
#[lang = "sized"]
trait Sized {}
//@ files "foo" "['sidebar-items.js', 'all.html', 'hidden', 'index.html', 'struct.Bar.html', \
// 'visible']"
//@ files "foo/hidden" "['inner']"

View file

@ -1,10 +1,13 @@
#![feature(intrinsics)]
#![feature(no_core)]
#![feature(no_core, lang_items)]
#![feature(rustc_attrs)]
#![no_core]
#![crate_name = "foo"]
#[lang = "sized"]
trait Sized {}
//@ has 'foo/fn.abort.html'
//@ has - '//pre[@class="rust item-decl"]' 'pub fn abort() -> !'
#[rustc_intrinsic]