Skip to content

Commit 567ec89

Browse files
committed
style fix
1 parent da3b2d2 commit 567ec89

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

compiler/rustc_next_trait_solver/src/solve/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,13 @@ where
163163
}
164164

165165
if self.cx().features().impl_stability() {
166-
// If we are in std, and the feature is not enabled through #[unstable_feature_bound(..)]
166+
// If we are in std/core, and the feature is not enabled through #[unstable_feature_bound(..)]
167167
return self.evaluate_added_goals_and_make_canonical_response(Certainty::Maybe(
168168
MaybeCause::Ambiguity,
169169
));
170170
} else {
171-
// Check if feature is enabled at crate level with #[feature(..)] or if we are currently in codegen.
171+
// Outside of std/core, check if feature is enabled at crate level with #[feature(..)]
172+
// or if we are currently in codegen.
172173
if self.cx().features().enabled(symbol)
173174
|| (self.typing_mode() == TypingMode::PostAnalysis)
174175
{

compiler/rustc_passes/src/stability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'tcx> {
811811
// it will have no effect.
812812
// See: https://github.com/rust-lang/rust/issues/55436
813813
//
814-
// The exception is when there is both #[unstable_feature_bound(..)] and
814+
// The exception is when there are both #[unstable_feature_bound(..)] and
815815
// #![unstable(feature = "..", issue = "..")] that have the same symbol because
816816
// that can effectively mark an impl as unstable.
817817
//

compiler/rustc_trait_selection/src/traits/select/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
839839
}
840840

841841
ty::PredicateKind::Clause(ty::ClauseKind::UnstableFeature(symbol)) => {
842+
// Iterate through all goals in param_env to find the one that has the same symbol.
842843
for pred in obligation.param_env.caller_bounds().iter() {
843844
if let ty::ClauseKind::UnstableFeature(sym) = pred.kind().skip_binder() {
844845
if sym == symbol {

tests/ui/internal/auxiliary/unstable_feature.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ impl Foo for Bar {
2020
fn foo() {}
2121
}
2222

23-
2423
#[unstable_feature_bound(feat_moo)]
2524
#[unstable(feature = "feat_moo", issue = "none" )]
2625
impl Foo for Moo {

0 commit comments

Comments
 (0)