Skip to content

Commit 74b7592

Browse files
committed
fix rebase
1 parent a2c3913 commit 74b7592

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler/rustc_const_eval/src/check_consts/ops.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use rustc_middle::mir::CallSource;
1111
use rustc_middle::span_bug;
1212
use rustc_middle::ty::print::{PrintTraitRefExt as _, with_no_trimmed_paths};
1313
use rustc_middle::ty::{
14-
self, AssocItemContainer, Closure, FnDef, FnPtr, GenericArgKind, GenericArgsRef, Param,
15-
TraitRef, Ty, suggest_constraining_type_param,
14+
self, AssocContainer, Closure, FnDef, FnPtr, GenericArgKind, GenericArgsRef, Param, TraitRef,
15+
Ty, suggest_constraining_type_param,
1616
};
1717
use rustc_session::parse::add_feature_diagnostics;
1818
use rustc_span::{BytePos, Pos, Span, Symbol, sym};
@@ -362,7 +362,7 @@ fn build_error_for_const_call<'tcx>(
362362
non_or_conditionally,
363363
});
364364
if let Some(item) = ccx.tcx.opt_associated_item(callee) {
365-
if let AssocItemContainer::Trait = item.container
365+
if let AssocContainer::Trait = item.container
366366
&& let parent = item.container_id(ccx.tcx)
367367
&& !ccx.tcx.is_const_trait(parent)
368368
{

tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-disabled.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
5959
note: method `a` is not const because trait `Foo` is not const
6060
--> const-super-trait.rs:3:1
6161
|
62-
3 | trait Foo {
62+
3 | trait Foo {
6363
| ^^^^^^^^^ this trait is not const
64-
4 | fn a(&self);
64+
4 | fn a(&self);
6565
| ------------ this method is not const
6666
= help: const traits are not yet supported on stable Rust
6767
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants

tests/run-make/const-trait-stable-toolchain/const-super-trait-stable-enabled.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ error[E0015]: cannot call non-const method `<T as Foo>::a` in constant functions
4949
note: method `a` is not const because trait `Foo` is not const
5050
--> const-super-trait.rs:3:1
5151
|
52-
3 | trait Foo {
52+
3 | trait Foo {
5353
| ^^^^^^^^^ this trait is not const
54-
4 | fn a(&self);
54+
4 | fn a(&self);
5555
| ------------ this method is not const
5656
= help: const traits are not yet supported on stable Rust
5757
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants

0 commit comments

Comments
 (0)