Skip to content

Commit 5b7baa5

Browse files
committed
Auto merge of #60416 - Centril:rollup-bbyyz9x, r=Centril
Rollup of 7 pull requests Successful merges: - #60344 (Don't try to render auto-trait bounds with any inference variables) - #60354 (Cleanup declare_features! for 'accepted' with a uniform style + sort them) - #60362 (Cleanup 'active' declare_features! with uniform style + sorting.) - #60382 (Revert "Update Source Code Pro fonts to version 2.030") - #60399 (Update clippy) - #60400 (Remove functions to simplify handling of feature(bind_by_move_pattern_guards)) - #60408 (Add missing f16c_target_feature check to typeck collect) Failed merges: r? @ghost
2 parents 862a878 + 71a1b80 commit 5b7baa5

File tree

13 files changed

+350
-276
lines changed

13 files changed

+350
-276
lines changed

src/librustc/traits/auto_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
712712
// Additionally, we check if we've seen this predicate before,
713713
// to avoid rendering duplicate bounds to the user.
714714
if self.is_param_no_infer(p.skip_binder().projection_ty.substs)
715-
&& !p.ty().skip_binder().is_ty_infer()
715+
&& !p.ty().skip_binder().has_infer_types()
716716
&& is_new_pred {
717717
debug!("evaluate_nested_obligations: adding projection predicate\
718718
to computed_preds: {:?}", predicate);

src/librustc/ty/context.rs

-20
Original file line numberDiff line numberDiff line change
@@ -1486,26 +1486,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
14861486
self.queries.on_disk_cache.serialize(self.global_tcx(), encoder)
14871487
}
14881488

1489-
/// This checks whether one is allowed to have pattern bindings
1490-
/// that bind-by-move on a match arm that has a guard, e.g.:
1491-
///
1492-
/// ```rust
1493-
/// match foo { A(inner) if { /* something */ } => ..., ... }
1494-
/// ```
1495-
///
1496-
/// It is separate from check_for_mutation_in_guard_via_ast_walk,
1497-
/// because that method has a narrower effect that can be toggled
1498-
/// off via a separate `-Z` flag, at least for the short term.
1499-
pub fn allow_bind_by_move_patterns_with_guards(self) -> bool {
1500-
self.features().bind_by_move_pattern_guards
1501-
}
1502-
1503-
/// If true, we should use a naive AST walk to determine if match
1504-
/// guard could perform bad mutations (or mutable-borrows).
1505-
pub fn check_for_mutation_in_guard_via_ast_walk(self) -> bool {
1506-
!self.allow_bind_by_move_patterns_with_guards()
1507-
}
1508-
15091489
/// If true, we should use the AST-based borrowck (we may *also* use
15101490
/// the MIR-based borrowck).
15111491
pub fn use_ast_borrowck(self) -> bool {

src/librustc_mir/hair/pattern/check_match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl<'a, 'tcx> MatchVisitor<'a, 'tcx> {
147147
// Second, if there is a guard on each arm, make sure it isn't
148148
// assigning or borrowing anything mutably.
149149
if let Some(ref guard) = arm.guard {
150-
if self.tcx.check_for_mutation_in_guard_via_ast_walk() {
150+
if !self.tcx.features().bind_by_move_pattern_guards {
151151
check_for_mutation_in_guard(self, &guard);
152152
}
153153
}
@@ -562,7 +562,7 @@ fn check_legality_of_move_bindings(
562562
"cannot bind by-move with sub-bindings")
563563
.span_label(p.span, "binds an already bound by-move value by moving it")
564564
.emit();
565-
} else if has_guard && !cx.tcx.allow_bind_by_move_patterns_with_guards() {
565+
} else if has_guard && !cx.tcx.features().bind_by_move_pattern_guards {
566566
let mut err = struct_span_err!(cx.tcx.sess, p.span, E0008,
567567
"cannot bind by-move into a pattern guard");
568568
err.span_label(p.span, "moves value into pattern guard");

src/librustc_typeck/collect.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,7 @@ fn from_target_feature(
24502450
Some("adx_target_feature") => rust_features.adx_target_feature,
24512451
Some("movbe_target_feature") => rust_features.movbe_target_feature,
24522452
Some("rtm_target_feature") => rust_features.rtm_target_feature,
2453+
Some("f16c_target_feature") => rust_features.f16c_target_feature,
24532454
Some(name) => bug!("unknown target feature gate {}", name),
24542455
None => true,
24552456
};

src/librustdoc/clean/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2945,6 +2945,7 @@ impl Clean<Type> for hir::Ty {
29452945

29462946
impl<'tcx> Clean<Type> for Ty<'tcx> {
29472947
fn clean(&self, cx: &DocContext<'_>) -> Type {
2948+
debug!("cleaning type: {:?}", self);
29482949
match self.sty {
29492950
ty::Never => Never,
29502951
ty::Bool => Primitive(PrimitiveType::Bool),

src/librustdoc/html/render.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ themePicker.onblur = handleThemeButtonsBlur;
938938
static_files::source_code_pro::REGULAR)?;
939939
write(cx.dst.join("SourceCodePro-Semibold.woff"),
940940
static_files::source_code_pro::SEMIBOLD)?;
941-
write(cx.dst.join("SourceCodePro-LICENSE.md"),
941+
write(cx.dst.join("SourceCodePro-LICENSE.txt"),
942942
static_files::source_code_pro::LICENSE)?;
943943
write(cx.dst.join("LICENSE-MIT.txt"),
944944
static_files::LICENSE_MIT)?;

src/librustdoc/html/static/SourceCodePro-LICENSE.md src/librustdoc/html/static/SourceCodePro-LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ with others.
1818

1919
The OFL allows the licensed fonts to be used, studied, modified and
2020
redistributed freely as long as they are not sold by themselves. The
21-
fonts, including any derivative works, can be bundled, embedded,
21+
fonts, including any derivative works, can be bundled, embedded,
2222
redistributed and/or sold with any software provided that any reserved
2323
names are not used by derivative works. The fonts and derivatives,
2424
however, cannot be released under any other type of license. The
Binary file not shown.
Binary file not shown.

src/librustdoc/html/static_files.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub mod source_code_pro {
103103
pub static SEMIBOLD: &'static [u8] = include_bytes!("static/SourceCodePro-Semibold.woff");
104104

105105
/// The file `SourceCodePro-LICENSE.txt`, the license text of the Source Code Pro font.
106-
pub static LICENSE: &'static [u8] = include_bytes!("static/SourceCodePro-LICENSE.md");
106+
pub static LICENSE: &'static [u8] = include_bytes!("static/SourceCodePro-LICENSE.txt");
107107
}
108108

109109
/// Files related to the sidebar in rustdoc sources.

0 commit comments

Comments
 (0)