Skip to content

Commit df76418

Browse files
committed
Auto merge of rust-lang#90387 - matthiaskrgr:rollup-b2x8v0x, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - rust-lang#90082 (Fix minor typos) - rust-lang#90336 (Remove extra lines in examples for `Duration::try_from_secs_*`) - rust-lang#90376 (Various cleanups around opaque types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents c390d69 + bcee0a6 commit df76418

File tree

9 files changed

+599
-655
lines changed

9 files changed

+599
-655
lines changed

compiler/rustc_borrowck/src/type_check/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ use rustc_span::def_id::CRATE_DEF_ID;
3636
use rustc_span::{Span, DUMMY_SP};
3737
use rustc_target::abi::VariantIdx;
3838
use rustc_trait_selection::infer::InferCtxtExt as _;
39-
use rustc_trait_selection::opaque_types::InferCtxtExt;
4039
use rustc_trait_selection::traits::error_reporting::InferCtxtExt as _;
4140
use rustc_trait_selection::traits::query::type_op;
4241
use rustc_trait_selection::traits::query::type_op::custom::CustomTypeOp;

compiler/rustc_infer/src/infer/opaque_types.rs

+591-1
Large diffs are not rendered by default.

compiler/rustc_trait_selection/src/opaque_types.rs

+6-642
Large diffs are not rendered by default.

compiler/rustc_typeck/src/check/_match.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKi
66
use rustc_infer::traits::Obligation;
77
use rustc_middle::ty::{self, ToPredicate, Ty, TyS};
88
use rustc_span::{MultiSpan, Span};
9-
use rustc_trait_selection::opaque_types::InferCtxtExt as _;
109
use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
1110
use rustc_trait_selection::traits::{
1211
IfExpressionCause, MatchExpressionArmCause, ObligationCause, ObligationCauseCode,

compiler/rustc_typeck/src/check/check.rs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use rustc_session::lint::builtin::{UNINHABITED_STATIC, UNSUPPORTED_CALLING_CONVE
2121
use rustc_span::symbol::sym;
2222
use rustc_span::{self, MultiSpan, Span};
2323
use rustc_target::spec::abi::Abi;
24-
use rustc_trait_selection::opaque_types::InferCtxtExt as _;
2524
use rustc_trait_selection::traits;
2625
use rustc_trait_selection::traits::error_reporting::InferCtxtExt as _;
2726
use rustc_ty_utils::representability::{self, Representability};

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ use rustc_span::source_map::{original_sp, DUMMY_SP};
3535
use rustc_span::symbol::{kw, sym, Ident};
3636
use rustc_span::{self, BytePos, MultiSpan, Span};
3737
use rustc_trait_selection::infer::InferCtxtExt as _;
38-
use rustc_trait_selection::opaque_types::InferCtxtExt as _;
3938
use rustc_trait_selection::traits::error_reporting::InferCtxtExt as _;
4039
use rustc_trait_selection::traits::{
4140
self, ObligationCause, ObligationCauseCode, StatementAsExpression, TraitEngine, TraitEngineExt,

compiler/rustc_typeck/src/check/regionck.rs

-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ use rustc_middle::hir::place::{PlaceBase, PlaceWithHirId};
8888
use rustc_middle::ty::adjustment;
8989
use rustc_middle::ty::{self, Ty};
9090
use rustc_span::Span;
91-
use rustc_trait_selection::opaque_types::InferCtxtExt as _;
9291
use std::ops::Deref;
9392

9493
// a variation on try that just returns unit
@@ -340,8 +339,6 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
340339
self.link_fn_params(body.params);
341340
self.visit_body(body);
342341
self.visit_region_obligations(body_id.hir_id);
343-
344-
self.constrain_opaque_types();
345342
}
346343

347344
fn visit_region_obligations(&mut self, hir_id: hir::HirId) {

library/core/src/time.rs

-3
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ impl Duration {
737737
/// # Examples
738738
/// ```
739739
/// #![feature(duration_checked_float)]
740-
///
741740
/// use std::time::Duration;
742741
///
743742
/// let dur = Duration::try_from_secs_f64(2.7);
@@ -799,7 +798,6 @@ impl Duration {
799798
/// # Examples
800799
/// ```
801800
/// #![feature(duration_checked_float)]
802-
///
803801
/// use std::time::Duration;
804802
///
805803
/// let dur = Duration::try_from_secs_f32(2.7);
@@ -1258,7 +1256,6 @@ impl fmt::Debug for Duration {
12581256
///
12591257
/// ```
12601258
/// #![feature(duration_checked_float)]
1261-
///
12621259
/// use std::time::Duration;
12631260
///
12641261
/// if let Err(e) = Duration::try_from_secs_f32(-1.0) {

src/doc/unstable-book/src/library-features/asm.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ assert_eq!(x, 5);
6666
This will write the value `5` into the `u64` variable `x`.
6767
You can see that the string literal we use to specify instructions is actually a template string.
6868
It is governed by the same rules as Rust [format strings][format-syntax].
69-
The arguments that are inserted into the template however look a bit different then you may
69+
The arguments that are inserted into the template however look a bit different than you may
7070
be familiar with. First we need to specify if the variable is an input or an output of the
7171
inline assembly. In this case it is an output. We declared this by writing `out`.
7272
We also need to specify in what kind of register the assembly expects the variable.
@@ -106,7 +106,7 @@ code.
106106
Second, we can see that inputs are declared by writing `in` instead of `out`.
107107

108108
Third, one of our operands has a type we haven't seen yet, `const`.
109-
This tells the compiler to expand this argument to value directly inside the assembly template.
109+
This tells the compiler to expand this argument to a value directly inside the assembly template.
110110
This is only possible for constants and literals.
111111

112112
Fourth, we can see that we can specify an argument number, or name as in any format string.

0 commit comments

Comments
 (0)