forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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 rust-lang#56365 - alexreg:stabilise-self_struct_ctor,…
… r=Centril Stabilize self_struct_ctor feature. [**Tracking Issue**](rust-lang#51994)
- Loading branch information
Showing
12 changed files
with
29 additions
and
141 deletions.
There are no files selected for viewing
33 changes: 0 additions & 33 deletions
33
src/doc/unstable-book/src/language-features/self-struct-ctor.md
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
// run-pass | ||
|
||
#![feature(self_struct_ctor)] | ||
|
||
#![allow(dead_code)] | ||
|
||
use std::fmt::Display; | ||
|
22 changes: 0 additions & 22 deletions
22
src/test/ui/feature-gates/feature-gate-self-struct-ctor.rs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/test/ui/feature-gates/feature-gate-self-struct-ctor.stderr
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
// compile-pass | ||
|
||
trait FooTrait {} | ||
|
||
trait BarTrait { | ||
fn foo<T: FooTrait>(_: T) -> Self; | ||
} | ||
|
||
struct FooStruct(u32); | ||
|
||
impl BarTrait for FooStruct { | ||
fn foo<T: FooTrait>(_: T) -> Self { | ||
Self(u32::default()) | ||
} | ||
} | ||
|
||
fn main() {} |
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