Skip to content

Commit

Permalink
Auto merge of #85109 - RalfJung:remove-const_fn, r=oli-obk
Browse files Browse the repository at this point in the history
remove const_fn feature gate

Fixes rust-lang/rust#84510
r? `@oli-obk`
  • Loading branch information
bors committed May 11, 2021
2 parents a8804e7 + c0095be commit 918a1a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion tests/ui/new_without_default.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(const_fn)]
#![allow(dead_code, clippy::missing_safety_doc)]
#![warn(clippy::new_without_default)]

Expand Down
12 changes: 6 additions & 6 deletions tests/ui/new_without_default.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: you should consider adding a `Default` implementation for `Foo`
--> $DIR/new_without_default.rs:8:5
--> $DIR/new_without_default.rs:7:5
|
LL | / pub fn new() -> Foo {
LL | | Foo
Expand All @@ -17,7 +17,7 @@ LL | }
|

error: you should consider adding a `Default` implementation for `Bar`
--> $DIR/new_without_default.rs:16:5
--> $DIR/new_without_default.rs:15:5
|
LL | / pub fn new() -> Self {
LL | | Bar
Expand All @@ -34,7 +34,7 @@ LL | }
|

error: you should consider adding a `Default` implementation for `LtKo<'c>`
--> $DIR/new_without_default.rs:80:5
--> $DIR/new_without_default.rs:79:5
|
LL | / pub fn new() -> LtKo<'c> {
LL | | unimplemented!()
Expand All @@ -51,7 +51,7 @@ LL | }
|

error: you should consider adding a `Default` implementation for `NewNotEqualToDerive`
--> $DIR/new_without_default.rs:157:5
--> $DIR/new_without_default.rs:156:5
|
LL | / pub fn new() -> Self {
LL | | NewNotEqualToDerive { foo: 1 }
Expand All @@ -68,7 +68,7 @@ LL | }
|

error: you should consider adding a `Default` implementation for `FooGenerics<T>`
--> $DIR/new_without_default.rs:165:5
--> $DIR/new_without_default.rs:164:5
|
LL | / pub fn new() -> Self {
LL | | Self(Default::default())
Expand All @@ -85,7 +85,7 @@ LL | }
|

error: you should consider adding a `Default` implementation for `BarGenerics<T>`
--> $DIR/new_without_default.rs:172:5
--> $DIR/new_without_default.rs:171:5
|
LL | / pub fn new() -> Self {
LL | | Self(Default::default())
Expand Down

0 comments on commit 918a1a2

Please sign in to comment.