Skip to content

Commit a79e08c

Browse files
committed
Update tests
1 parent 5e695bb commit a79e08c

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

compiler/rustc_mir/src/const_eval/fn_queries.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use rustc_hir::def_id::{DefId, LocalDefId};
33
use rustc_middle::hir::map::blocks::FnLikeNode;
44
use rustc_middle::ty::query::Providers;
55
use rustc_middle::ty::TyCtxt;
6-
use rustc_span::symbol::{sym, Symbol};
6+
use rustc_span::symbol::Symbol;
77
use rustc_target::spec::abi::Abi;
88

99
/// Whether the `def_id` counts as const fn in your current crate, considering all active

src/test/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// check-pass
2-
// TODO remove this^
3-
41
#![feature(const_trait_impl)]
52
#![feature(const_fn_trait_bound)] // FIXME is this needed?
63
#![allow(incomplete_features)]
@@ -27,7 +24,7 @@ impl const ConstDefaultFn for ConstImpl {
2724

2825
const fn test() {
2926
NonConstImpl.a();
30-
// TODO ~^ ERROR calls in constant functions are limited to constant functions, tuple structs and tuple variants
27+
//~^ ERROR calls in constant functions are limited to constant functions, tuple structs and tuple variants
3128
ConstImpl.a();
3229
}
3330

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
2+
--> $DIR/const-default-method-bodies.rs:26:5
3+
|
4+
LL | NonConstImpl.a();
5+
| ^^^^^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0015`.

0 commit comments

Comments
 (0)