diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-06-08 20:26:38 +0900 |
|---|---|---|
| committer | Yuki Okushi <jtitor@2k36.org> | 2022-06-08 21:03:24 +0900 |
| commit | d8f07654e83156de0da1807e2986a79cde04596c (patch) | |
| tree | b886206dfdf6513584607ac994b32052dbc5e7b0 | |
| parent | e45d9973b2665897a768312e971b82cc62633103 (diff) | |
| download | rust-d8f07654e83156de0da1807e2986a79cde04596c.tar.gz rust-d8f07654e83156de0da1807e2986a79cde04596c.zip | |
Remove doc
| -rw-r--r-- | src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md b/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md deleted file mode 100644 index 5f3f1b4dd8a..00000000000 --- a/src/doc/unstable-book/src/language-features/infer-static-outlives-requirements.md +++ /dev/null @@ -1,44 +0,0 @@ -# `infer_static_outlives_requirements` - -The tracking issue for this feature is: [#54185] - -[#54185]: https://github.com/rust-lang/rust/issues/54185 - ------------------------- -The `infer_static_outlives_requirements` feature indicates that certain -`'static` outlives requirements can be inferred by the compiler rather than -stating them explicitly. - -Note: It is an accompanying feature to `infer_outlives_requirements`, -which must be enabled to infer outlives requirements. - -For example, currently generic struct definitions that contain -references, require where-clauses of the form T: 'static. By using -this feature the outlives predicates will be inferred, although -they may still be written explicitly. - -```rust,ignore (pseudo-Rust) -struct Foo<U> where U: 'static { // <-- currently required - bar: Bar<U> -} -struct Bar<T: 'static> { - x: T, -} -``` - - -## Examples: - -```rust,ignore (pseudo-Rust) -#![feature(infer_outlives_requirements)] -#![feature(infer_static_outlives_requirements)] - -#[rustc_outlives] -// Implicitly infer U: 'static -struct Foo<U> { - bar: Bar<U> -} -struct Bar<T: 'static> { - x: T, -} -``` |
