Skip to content

Commit fa459a0

Browse files
committed
Fix rebase fallout
1 parent 52fa900 commit fa459a0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/librustc/ty/print/pretty.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::hir;
2-
use crate::hir::def::{Namespace, Def};
2+
use crate::hir::def::{Namespace, DefKind};
33
use crate::hir::map::{DefPathData, DisambiguatedDefPathData};
44
use crate::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
55
use crate::middle::cstore::{ExternCrate, ExternCrateSource};
@@ -820,10 +820,10 @@ pub trait PrettyPrinter<'gcx: 'tcx, 'tcx>:
820820
return Ok(self);
821821
}
822822
if let ConstValue::Unevaluated(did, substs) = ct.val {
823-
match self.tcx().describe_def(did) {
824-
| Some(Def::Static(_))
825-
| Some(Def::Const(_))
826-
| Some(Def::AssociatedConst(_)) => p!(print_value_path(did, substs)),
823+
match self.tcx().def_kind(did) {
824+
| Some(DefKind::Static)
825+
| Some(DefKind::Const)
826+
| Some(DefKind::AssociatedConst) => p!(print_value_path(did, substs)),
827827
_ => if did.is_local() {
828828
let span = self.tcx().def_span(did);
829829
if let Ok(snip) = self.tcx().sess.source_map().span_to_snippet(span) {

src/librustc_mir/monomorphize/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl<'a, 'tcx> DefPathBasedNames<'a, 'tcx> {
401401
// as well as the unprintable types of constants (see `push_type_name` for more details).
402402
pub fn push_const_name(&self, c: &Const<'tcx>, output: &mut String, debug: bool) {
403403
match c.val {
404-
ConstValue::Scalar(..) | ConstValue::Slice(..) | ConstValue::ByRef(..) => {
404+
ConstValue::Scalar(..) | ConstValue::Slice { .. } | ConstValue::ByRef(..) => {
405405
// FIXME(const_generics): we could probably do a better job here.
406406
write!(output, "{:?}", c).unwrap()
407407
}

src/test/ui/const-generics/cannot-infer-const-args.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ error[E0282]: type annotations needed
88
--> $DIR/cannot-infer-const-args.rs:9:5
99
|
1010
LL | foo();
11-
| ^^^ cannot infer type for `fn() -> usize {foo::<_>}`
11+
| ^^^ cannot infer type for `fn() -> usize {foo::<_: usize>}`
1212

1313
error: aborting due to previous error
1414

0 commit comments

Comments
 (0)