Auto merge of #105979 - matthiaskrgr:rollup-2luw3mx, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #105791 (docs: add long error explanation for error E0472) - #105897 (Fix an opaque type ICE) - #105904 (Fix arch flag on i686-apple-darwin) - #105949 (Bump `cfg-if` to `1.0` in rustc crates) - #105964 (rustdoc: prevent CSS layout of line numbers shrinking into nothing) - #105972 (rustdoc: simplify section anchor CSS) - #105973 (Avoid going through the happy path in case of non-fn builtin calls) - #105976 (Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
b569c9dc57
27 changed files with 234 additions and 71 deletions
|
|
@ -3590,7 +3590,7 @@ version = "0.0.0"
|
|||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
"cfg-if 0.1.10",
|
||||
"cfg-if 1.0.0",
|
||||
"ena",
|
||||
"indexmap",
|
||||
"jobserver",
|
||||
|
|
@ -4374,7 +4374,7 @@ dependencies = [
|
|||
name = "rustc_span"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10",
|
||||
"cfg-if 1.0.0",
|
||||
"md-5",
|
||||
"rustc_arena",
|
||||
"rustc_data_structures",
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ use rustc_infer::infer::{
|
|||
use rustc_middle::hir::place::PlaceBase;
|
||||
use rustc_middle::mir::{ConstraintCategory, ReturnConstraint};
|
||||
use rustc_middle::ty::subst::InternalSubsts;
|
||||
use rustc_middle::ty::Region;
|
||||
use rustc_middle::ty::TypeVisitor;
|
||||
use rustc_middle::ty::{self, RegionVid, Ty};
|
||||
use rustc_middle::ty::{Region, TyCtxt};
|
||||
use rustc_span::symbol::{kw, Ident};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
|
||||
use crate::borrowck_errors;
|
||||
use crate::session_diagnostics::{
|
||||
|
|
@ -70,7 +70,25 @@ impl<'tcx> ConstraintDescription for ConstraintCategory<'tcx> {
|
|||
///
|
||||
/// Usually we expect this to either be empty or contain a small number of items, so we can avoid
|
||||
/// allocation most of the time.
|
||||
pub(crate) type RegionErrors<'tcx> = Vec<RegionErrorKind<'tcx>>;
|
||||
pub(crate) struct RegionErrors<'tcx>(Vec<RegionErrorKind<'tcx>>, TyCtxt<'tcx>);
|
||||
|
||||
impl<'tcx> RegionErrors<'tcx> {
|
||||
pub fn new(tcx: TyCtxt<'tcx>) -> Self {
|
||||
Self(vec![], tcx)
|
||||
}
|
||||
#[track_caller]
|
||||
pub fn push(&mut self, val: impl Into<RegionErrorKind<'tcx>>) {
|
||||
let val = val.into();
|
||||
self.1.sess.delay_span_bug(DUMMY_SP, "{val:?}");
|
||||
self.0.push(val);
|
||||
}
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.0.is_empty()
|
||||
}
|
||||
pub fn into_iter(self) -> impl Iterator<Item = RegionErrorKind<'tcx>> {
|
||||
self.0.into_iter()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) enum RegionErrorKind<'tcx> {
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
|||
let mir_def_id = body.source.def_id();
|
||||
self.propagate_constraints(body);
|
||||
|
||||
let mut errors_buffer = RegionErrors::new();
|
||||
let mut errors_buffer = RegionErrors::new(infcx.tcx);
|
||||
|
||||
// If this is a closure, we can propagate unsatisfied
|
||||
// `outlives_requirements` to our creator, so create a vector
|
||||
|
|
@ -1647,26 +1647,29 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
|||
let longer_fr_scc = self.constraint_sccs.scc(longer_fr);
|
||||
debug!("check_bound_universal_region: longer_fr_scc={:?}", longer_fr_scc,);
|
||||
|
||||
// If we have some bound universal region `'a`, then the only
|
||||
// elements it can contain is itself -- we don't know anything
|
||||
// else about it!
|
||||
let Some(error_element) = ({
|
||||
self.scc_values.elements_contained_in(longer_fr_scc).find(|element| match element {
|
||||
RegionElement::Location(_) => true,
|
||||
RegionElement::RootUniversalRegion(_) => true,
|
||||
RegionElement::PlaceholderRegion(placeholder1) => placeholder != *placeholder1,
|
||||
})
|
||||
}) else {
|
||||
return;
|
||||
};
|
||||
debug!("check_bound_universal_region: error_element = {:?}", error_element);
|
||||
for error_element in self.scc_values.elements_contained_in(longer_fr_scc) {
|
||||
match error_element {
|
||||
RegionElement::Location(_) | RegionElement::RootUniversalRegion(_) => {}
|
||||
// If we have some bound universal region `'a`, then the only
|
||||
// elements it can contain is itself -- we don't know anything
|
||||
// else about it!
|
||||
RegionElement::PlaceholderRegion(placeholder1) => {
|
||||
if placeholder == placeholder1 {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find the region that introduced this `error_element`.
|
||||
errors_buffer.push(RegionErrorKind::BoundUniversalRegionError {
|
||||
longer_fr,
|
||||
error_element,
|
||||
placeholder,
|
||||
});
|
||||
errors_buffer.push(RegionErrorKind::BoundUniversalRegionError {
|
||||
longer_fr,
|
||||
error_element,
|
||||
placeholder,
|
||||
});
|
||||
|
||||
// Stop after the first error, it gets too noisy otherwise, and does not provide more information.
|
||||
break;
|
||||
}
|
||||
debug!("check_bound_universal_region: all bounds satisfied");
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, infcx, errors_buffer))]
|
||||
|
|
|
|||
|
|
@ -1153,16 +1153,23 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
category: ConstraintCategory<'tcx>,
|
||||
) -> Fallible<()> {
|
||||
let annotated_type = self.user_type_annotations[user_ty.base].inferred_ty;
|
||||
trace!(?annotated_type);
|
||||
let mut curr_projected_ty = PlaceTy::from_ty(annotated_type);
|
||||
|
||||
let tcx = self.infcx.tcx;
|
||||
|
||||
for proj in &user_ty.projs {
|
||||
if let ty::Alias(ty::Opaque, ..) = curr_projected_ty.ty.kind() {
|
||||
// There is nothing that we can compare here if we go through an opaque type.
|
||||
// We're always in its defining scope as we can otherwise not project through
|
||||
// it, so we're constraining it anyways.
|
||||
return Ok(());
|
||||
}
|
||||
let projected_ty = curr_projected_ty.projection_ty_core(
|
||||
tcx,
|
||||
self.param_env,
|
||||
proj,
|
||||
|this, field, _| {
|
||||
|this, field, ()| {
|
||||
let ty = this.field_ty(tcx, field);
|
||||
self.normalize(ty, locations)
|
||||
},
|
||||
|
|
@ -1170,10 +1177,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
|
|||
);
|
||||
curr_projected_ty = projected_ty;
|
||||
}
|
||||
debug!(
|
||||
"user_ty base: {:?} freshened: {:?} projs: {:?} yields: {:?}",
|
||||
user_ty.base, annotated_type, user_ty.projs, curr_projected_ty
|
||||
);
|
||||
trace!(?curr_projected_ty);
|
||||
|
||||
let ty = curr_projected_ty.ty;
|
||||
self.relate_types(ty, v.xform(ty::Variance::Contravariant), a, locations, category)?;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ edition = "2021"
|
|||
[dependencies]
|
||||
arrayvec = { version = "0.7", default-features = false }
|
||||
bitflags = "1.2.1"
|
||||
cfg-if = "0.1.2"
|
||||
cfg-if = "1.0"
|
||||
ena = "0.14"
|
||||
indexmap = { version = "1.9.1" }
|
||||
jobserver_crate = { version = "0.1.13", package = "jobserver" }
|
||||
|
|
@ -21,7 +21,11 @@ rustc-hash = "1.1.0"
|
|||
rustc_index = { path = "../rustc_index", package = "rustc_index" }
|
||||
rustc_macros = { path = "../rustc_macros" }
|
||||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
smallvec = { version = "1.8.1", features = ["const_generics", "union", "may_dangle"] }
|
||||
smallvec = { version = "1.8.1", features = [
|
||||
"const_generics",
|
||||
"union",
|
||||
"may_dangle",
|
||||
] }
|
||||
stable_deref_trait = "1.0.0"
|
||||
stacker = "0.1.15"
|
||||
tempfile = "3.2"
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ E0464: include_str!("./error_codes/E0464.md"),
|
|||
E0466: include_str!("./error_codes/E0466.md"),
|
||||
E0468: include_str!("./error_codes/E0468.md"),
|
||||
E0469: include_str!("./error_codes/E0469.md"),
|
||||
E0472: include_str!("./error_codes/E0472.md"),
|
||||
E0477: include_str!("./error_codes/E0477.md"),
|
||||
E0478: include_str!("./error_codes/E0478.md"),
|
||||
E0482: include_str!("./error_codes/E0482.md"),
|
||||
|
|
@ -599,7 +600,6 @@ E0791: include_str!("./error_codes/E0791.md"),
|
|||
// E0467, // removed
|
||||
// E0470, // removed
|
||||
// E0471, // constant evaluation error (in pattern)
|
||||
E0472, // llvm_asm! is unsupported on this target
|
||||
// E0473, // dereference of reference outside its lifetime
|
||||
// E0474, // captured variable `..` does not outlive the enclosing closure
|
||||
// E0475, // index of slice outside its lifetime
|
||||
|
|
|
|||
31
compiler/rustc_error_codes/src/error_codes/E0472.md
Normal file
31
compiler/rustc_error_codes/src/error_codes/E0472.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
Inline assembly (`asm!`) is not supported on this target.
|
||||
|
||||
Example of erroneous code:
|
||||
|
||||
```ignore (cannot-change-target)
|
||||
// compile-flags: --target sparc64-unknown-linux-gnu
|
||||
#![no_std]
|
||||
|
||||
use core::arch::asm;
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
asm!(""); // error: inline assembly is not supported on this target
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The Rust compiler does not support inline assembly, with the `asm!` macro
|
||||
(previously `llvm_asm!`), for all targets. All Tier 1 targets do support this
|
||||
macro but support among Tier 2 and 3 targets is not guaranteed (even when they
|
||||
have `std` support). Note that this error is related to
|
||||
`error[E0658]: inline assembly is not stable yet on this architecture`, but
|
||||
distinct in that with `E0472` support is not planned or in progress.
|
||||
|
||||
There is no way to easily fix this issue, however:
|
||||
* Consider if you really need inline assembly, is there some other way to
|
||||
achieve your goal (intrinsics, etc)?
|
||||
* Consider writing your assembly externally, linking with it and calling it
|
||||
from Rust.
|
||||
* Consider contributing to <https://github.com/rust-lang/rust> and help
|
||||
integrate support for your target!
|
||||
|
|
@ -4,7 +4,7 @@ use super::{Expectation, FnCtxt, TupleArgumentsFlag};
|
|||
|
||||
use crate::type_error_struct;
|
||||
use rustc_ast::util::parser::PREC_POSTFIX;
|
||||
use rustc_errors::{struct_span_err, Applicability, Diagnostic, StashKey};
|
||||
use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorGuaranteed, StashKey};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{self, CtorKind, Namespace, Res};
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
|
@ -424,21 +424,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
self.report_invalid_callee(call_expr, callee_expr, callee_ty, arg_exprs);
|
||||
let err = self.report_invalid_callee(call_expr, callee_expr, callee_ty, arg_exprs);
|
||||
|
||||
// This is the "default" function signature, used in case of error.
|
||||
// In that case, we check each argument against "error" in order to
|
||||
// set up all the node type bindings.
|
||||
(
|
||||
ty::Binder::dummy(self.tcx.mk_fn_sig(
|
||||
self.err_args(arg_exprs.len()).into_iter(),
|
||||
self.tcx.ty_error(),
|
||||
false,
|
||||
hir::Unsafety::Normal,
|
||||
abi::Abi::Rust,
|
||||
)),
|
||||
None,
|
||||
)
|
||||
return self.tcx.ty_error_with_guaranteed(err);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -591,7 +579,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
callee_expr: &'tcx hir::Expr<'tcx>,
|
||||
callee_ty: Ty<'tcx>,
|
||||
arg_exprs: &'tcx [hir::Expr<'tcx>],
|
||||
) {
|
||||
) -> ErrorGuaranteed {
|
||||
let mut unit_variant = None;
|
||||
if let hir::ExprKind::Path(qpath) = &callee_expr.kind
|
||||
&& let Res::Def(def::DefKind::Ctor(kind, CtorKind::Const), _)
|
||||
|
|
@ -720,7 +708,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
err.span_label(span, label);
|
||||
}
|
||||
}
|
||||
err.emit();
|
||||
err.emit()
|
||||
}
|
||||
|
||||
fn confirm_deferred_closure_call(
|
||||
|
|
|
|||
|
|
@ -32,8 +32,9 @@ impl<'tcx> PlaceTy<'tcx> {
|
|||
/// not carry a `Ty` for `T`.)
|
||||
///
|
||||
/// Note that the resulting type has not been normalized.
|
||||
#[instrument(level = "debug", skip(tcx), ret)]
|
||||
pub fn field_ty(self, tcx: TyCtxt<'tcx>, f: Field) -> Ty<'tcx> {
|
||||
let answer = match self.ty.kind() {
|
||||
match self.ty.kind() {
|
||||
ty::Adt(adt_def, substs) => {
|
||||
let variant_def = match self.variant_index {
|
||||
None => adt_def.non_enum_variant(),
|
||||
|
|
@ -47,9 +48,7 @@ impl<'tcx> PlaceTy<'tcx> {
|
|||
}
|
||||
ty::Tuple(tys) => tys[f.index()],
|
||||
_ => bug!("extracting field of non-tuple non-adt: {:?}", self),
|
||||
};
|
||||
debug!("field_ty self: {:?} f: {:?} yields: {:?}", self, f, answer);
|
||||
answer
|
||||
}
|
||||
}
|
||||
|
||||
/// Convenience wrapper around `projection_ty_core` for
|
||||
|
|
|
|||
|
|
@ -400,6 +400,7 @@ impl<'tcx> InternalSubsts<'tcx> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
pub fn type_at(&self, i: usize) -> Ty<'tcx> {
|
||||
if let GenericArgKind::Type(ty) = self[i].unpack() {
|
||||
ty
|
||||
|
|
@ -409,6 +410,7 @@ impl<'tcx> InternalSubsts<'tcx> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
pub fn region_at(&self, i: usize) -> ty::Region<'tcx> {
|
||||
if let GenericArgKind::Lifetime(lt) = self[i].unpack() {
|
||||
lt
|
||||
|
|
@ -418,6 +420,7 @@ impl<'tcx> InternalSubsts<'tcx> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
pub fn const_at(&self, i: usize) -> ty::Const<'tcx> {
|
||||
if let GenericArgKind::Const(ct) = self[i].unpack() {
|
||||
ct
|
||||
|
|
@ -427,6 +430,7 @@ impl<'tcx> InternalSubsts<'tcx> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
#[track_caller]
|
||||
pub fn type_for_def(&self, def: &ty::GenericParamDef) -> GenericArg<'tcx> {
|
||||
self.type_at(def.index as usize).into()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,14 +66,14 @@ pub fn as_constant_inner<'tcx>(
|
|||
|
||||
let literal = ConstantKind::Val(ConstValue::Scalar(Scalar::Int(lit)), ty);
|
||||
|
||||
Constant { span, user_ty: user_ty, literal }
|
||||
Constant { span, user_ty, literal }
|
||||
}
|
||||
ExprKind::ZstLiteral { ref user_ty } => {
|
||||
let user_ty = user_ty.as_ref().map(push_cuta).flatten();
|
||||
|
||||
let literal = ConstantKind::Val(ConstValue::ZeroSized, ty);
|
||||
|
||||
Constant { span, user_ty: user_ty, literal }
|
||||
Constant { span, user_ty, literal }
|
||||
}
|
||||
ExprKind::NamedConst { def_id, substs, ref user_ty } => {
|
||||
let user_ty = user_ty.as_ref().map(push_cuta).flatten();
|
||||
|
|
|
|||
|
|
@ -2210,7 +2210,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
BindingMode::ByValue => ty::BindingMode::BindByValue(mutability),
|
||||
BindingMode::ByRef(_) => ty::BindingMode::BindByReference(mutability),
|
||||
};
|
||||
let local = LocalDecl::<'tcx> {
|
||||
let local = LocalDecl {
|
||||
mutability,
|
||||
ty: var_ty,
|
||||
user_ty: if user_ty.is_empty() { None } else { Some(Box::new(user_ty)) },
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ rustc_index = { path = "../rustc_index" }
|
|||
rustc_arena = { path = "../rustc_arena" }
|
||||
scoped-tls = "1.0"
|
||||
unicode-width = "0.1.4"
|
||||
cfg-if = "0.1.2"
|
||||
cfg-if = "1.0"
|
||||
tracing = "0.1"
|
||||
sha1 = { package = "sha-1", version = "0.10.0" }
|
||||
sha2 = "0.10.1"
|
||||
|
|
|
|||
|
|
@ -57,11 +57,6 @@ tidy:
|
|||
prepare:
|
||||
$(Q)$(BOOTSTRAP) build --stage 2 nonexistent/path/to/trigger/cargo/metadata
|
||||
|
||||
check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu:
|
||||
$(Q)$(BOOTSTRAP) test --stage 2 --target arm-linux-androideabi
|
||||
check-stage2-T-x86_64-unknown-linux-musl-H-x86_64-unknown-linux-gnu:
|
||||
$(Q)$(BOOTSTRAP) test --stage 2 --target x86_64-unknown-linux-musl
|
||||
|
||||
TESTS_IN_2 := \
|
||||
src/test/ui \
|
||||
src/tools/linkchecker
|
||||
|
|
|
|||
|
|
@ -600,6 +600,9 @@ fn configure_cmake(
|
|||
if target.starts_with("aarch64") {
|
||||
// macOS uses a different name for building arm64
|
||||
cfg.define("CMAKE_OSX_ARCHITECTURES", "arm64");
|
||||
} else if target.starts_with("i686") {
|
||||
// macOS uses a different name for building i386
|
||||
cfg.define("CMAKE_OSX_ARCHITECTURES", "i386");
|
||||
} else {
|
||||
cfg.define("CMAKE_OSX_ARCHITECTURES", target.triple.split('-').next().unwrap());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -543,6 +543,7 @@ ul.block, .block li {
|
|||
.rustdoc .example-wrap > pre.example-line-numbers,
|
||||
.rustdoc .example-wrap > pre.src-line-numbers {
|
||||
flex-grow: 0;
|
||||
min-width: fit-content; /* prevent collapsing into nothing in truncated scraped examples */
|
||||
overflow: initial;
|
||||
text-align: right;
|
||||
-webkit-user-select: none;
|
||||
|
|
@ -689,14 +690,10 @@ a {
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.small-section-header:hover > .anchor {
|
||||
.small-section-header:hover > .anchor, .impl:hover > .anchor,
|
||||
.trait-impl:hover > .anchor, .variant:hover > .anchor {
|
||||
display: initial;
|
||||
}
|
||||
|
||||
.impl:hover > .anchor, .trait-impl:hover > .anchor, .variant:hover > .anchor {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
}
|
||||
.anchor {
|
||||
display: none;
|
||||
position: absolute;
|
||||
|
|
|
|||
35
src/test/rustdoc-gui/scrape-examples-layout.goml
Normal file
35
src/test/rustdoc-gui/scrape-examples-layout.goml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
// Check that the line number column has the correct layout.
|
||||
goto: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
|
||||
|
||||
// Check that it's not zero.
|
||||
assert-property-false: (
|
||||
".more-scraped-examples .scraped-example .code-wrapper .src-line-numbers",
|
||||
{"clientWidth": "0"}
|
||||
)
|
||||
|
||||
// Check that examples with very long lines have the same width as ones that don't.
|
||||
store-property: (
|
||||
clientWidth,
|
||||
".more-scraped-examples .scraped-example:nth-child(1) .code-wrapper .src-line-numbers",
|
||||
"clientWidth"
|
||||
)
|
||||
|
||||
assert-property: (
|
||||
".more-scraped-examples .scraped-example:nth-child(2) .code-wrapper .src-line-numbers",
|
||||
{"clientWidth": |clientWidth|}
|
||||
)
|
||||
|
||||
assert-property: (
|
||||
".more-scraped-examples .scraped-example:nth-child(3) .code-wrapper .src-line-numbers",
|
||||
{"clientWidth": |clientWidth|}
|
||||
)
|
||||
|
||||
assert-property: (
|
||||
".more-scraped-examples .scraped-example:nth-child(4) .code-wrapper .src-line-numbers",
|
||||
{"clientWidth": |clientWidth|}
|
||||
)
|
||||
|
||||
assert-property: (
|
||||
".more-scraped-examples .scraped-example:nth-child(5) .code-wrapper .src-line-numbers",
|
||||
{"clientWidth": |clientWidth|}
|
||||
)
|
||||
|
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
// all examples have same line count
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
scrape_examples::test_many();
|
||||
// ignore-tidy-linelength
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
scrape_examples::test_many();
|
||||
// ignore-tidy-linelength
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
scrape_examples::test_many(); /* Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
// all examples have same line count
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
// all examples have same line count
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
// all examples have same line count
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
fn main() {
|
||||
// all examples have same line count
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
scrape_examples::test_many();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,3 +14,4 @@ LL | global_asm!("");
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0472`.
|
||||
|
|
|
|||
|
|
@ -14,3 +14,4 @@ LL | global_asm!("");
|
|||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0472`.
|
||||
|
|
|
|||
10
src/test/ui/type-alias-impl-trait/destructuring.rs
Normal file
10
src/test/ui/type-alias-impl-trait/destructuring.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
// check-pass
|
||||
|
||||
// issue: https://github.com/rust-lang/rust/issues/104551
|
||||
|
||||
fn main() {
|
||||
type T = impl Sized;
|
||||
let (_a, _b): T = (1u32, 2u32);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue