-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #108335 - compiler-errors:non_lifetime_binders-rustdo…
…c, r=GuillaumeGomez rustdoc + rustdoc-json support for `feature(non_lifetime_binders)` Makes `for<T> T: Trait` and `for<const N: usize> ..` in where clause operate correctly. Fixes #108158
- Loading branch information
Showing
7 changed files
with
73 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// ignore-tidy-linelength | ||
|
||
#![feature(non_lifetime_binders)] | ||
#![allow(incomplete_features)] | ||
|
||
#![no_core] | ||
#![feature(lang_items, no_core)] | ||
|
||
#[lang = "sized"] | ||
pub trait Sized {} | ||
|
||
pub trait Trait {} | ||
|
||
#[lang = "phantom_data"] | ||
struct PhantomData<T_>; | ||
|
||
pub struct Wrapper<T_>(PhantomData<T_>); | ||
|
||
// @count "$.index[*][?(@.name=='foo')].inner.generics.where_predicates[0].bound_predicate.generic_params[*]" 2 | ||
// @is "$.index[*][?(@.name=='foo')].inner.generics.where_predicates[0].bound_predicate.generic_params[0].name" \"\'a\" | ||
// @is "$.index[*][?(@.name=='foo')].inner.generics.where_predicates[0].bound_predicate.generic_params[0].kind" '{ "lifetime": { "outlives": [] } }' | ||
// @is "$.index[*][?(@.name=='foo')].inner.generics.where_predicates[0].bound_predicate.generic_params[1].name" \"T\" | ||
// @is "$.index[*][?(@.name=='foo')].inner.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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#![feature(non_lifetime_binders)] | ||
#![allow(incomplete_features)] | ||
|
||
pub trait Trait {} | ||
|
||
pub struct Wrapper<T: ?Sized>(Box<T>); | ||
|
||
// @has non_lifetime_binders/fn.foo.html '//pre' "fn foo()where for<'a, T> &'a Wrapper<T>: Trait" | ||
pub fn foo() where for<'a, T> &'a Wrapper<T>: Trait {} |