Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions compiler/rustc_type_ir/src/binder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,17 @@ pub struct EarlyBinder<I: Interner, T> {

impl<I: Interner, T: Eq> Eq for EarlyBinder<I, T> {}

/// For early binders, you should first call `instantiate` before using any visitors.
// FIXME(154045): Recommended as per https://github.com/rust-lang/rust/issues/154045, this is so sad :((
#[cfg(feature = "nightly")]
impl<I: Interner, T> !TypeFoldable<I> for ty::EarlyBinder<I, T> {}
macro_rules! generate { ($( $tt:tt )*) => { $( $tt )* } }

/// For early binders, you should first call `instantiate` before using any visitors.
#[cfg(feature = "nightly")]
impl<I: Interner, T> !TypeVisitable<I> for ty::EarlyBinder<I, T> {}
generate!(
/// For early binders, you should first call `instantiate` before using any visitors.
impl<I: Interner, T> !TypeFoldable<I> for ty::EarlyBinder<I, T> {}
/// For early binders, you should first call `instantiate` before using any visitors.
impl<I: Interner, T> !TypeVisitable<I> for ty::EarlyBinder<I, T> {}
);

impl<I: Interner, T> EarlyBinder<I, T> {
pub fn bind(value: T) -> EarlyBinder<I, T> {
Expand Down
9 changes: 5 additions & 4 deletions compiler/rustc_type_ir/src/ir_print.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use std::fmt;

use crate::{
AliasTerm, AliasTy, Binder, ClosureKind, CoercePredicate, ExistentialProjection,
ExistentialTraitRef, FnSig, HostEffectPredicate, Interner, NormalizesTo, OutlivesPredicate,
PatternKind, Placeholder, ProjectionPredicate, SubtypePredicate, TraitPredicate, TraitRef,
UnevaluatedConst,
AliasTerm, AliasTy, Binder, CoercePredicate, ExistentialProjection, ExistentialTraitRef, FnSig,
HostEffectPredicate, Interner, NormalizesTo, OutlivesPredicate, PatternKind, Placeholder,
ProjectionPredicate, SubtypePredicate, TraitPredicate, TraitRef,
};
#[cfg(feature = "nightly")]
use crate::{ClosureKind, UnevaluatedConst};

pub trait IrPrint<T> {
fn print(t: &T, fmt: &mut fmt::Formatter<'_>) -> fmt::Result;
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make-cargo/rustc-crates-on-stable/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
.env("RUSTC_STAGE", "0")
.env("RUSTC", rustc_path())
// We want to disallow all nightly features to simulate a stable build
.env("RUSTFLAGS", "-Zallow-features=")
.env("RUSTFLAGS", "-D warnings -Zallow-features=")
.arg("build")
.arg("--manifest-path")
.arg(source_root().join("Cargo.toml"))
Expand Down
Loading