Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5f1aeb5

Browse files
committedApr 22, 2021
Auto merge of rust-lang#84440 - Dylan-DPC:rollup-0xjb8oi, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - rust-lang#84343 (Remove `ScopeTree::closure_tree`) - rust-lang#84376 (Uses flex to fix formatting of h1 at any width) - rust-lang#84377 (Followup to rust-lang#83944) - rust-lang#84396 (Update LLVM submodule) - rust-lang#84402 (Move `sys_common::rwlock::StaticRWLock` etc. to `sys::unix::rwlock`) - rust-lang#84404 (Check for intrinsics before coercing to a function pointer) - rust-lang#84413 (Remove `sys::args::Args::inner_debug` and use `Debug` instead) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents ccf1712 + d1f5fc6 commit 5f1aeb5

File tree

21 files changed

+372
-567
lines changed

21 files changed

+372
-567
lines changed
 

‎compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,8 +1213,41 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
12131213
deny_equality_constraints(self, predicate, generics);
12141214
}
12151215
}
1216-
1217-
visit::walk_generics(self, generics)
1216+
walk_list!(self, visit_generic_param, &generics.params);
1217+
for predicate in &generics.where_clause.predicates {
1218+
match predicate {
1219+
WherePredicate::BoundPredicate(bound_pred) => {
1220+
// A type binding, eg `for<'c> Foo: Send+Clone+'c`
1221+
self.check_late_bound_lifetime_defs(&bound_pred.bound_generic_params);
1222+
1223+
// This is slightly complicated. Our representation for poly-trait-refs contains a single
1224+
// binder and thus we only allow a single level of quantification. However,
1225+
// the syntax of Rust permits quantification in two places in where clauses,
1226+
// e.g., `T: for <'a> Foo<'a>` and `for <'a, 'b> &'b T: Foo<'a>`. If both are
1227+
// defined, then error.
1228+
if !bound_pred.bound_generic_params.is_empty() {
1229+
for bound in &bound_pred.bounds {
1230+
match bound {
1231+
GenericBound::Trait(t, _) => {
1232+
if !t.bound_generic_params.is_empty() {
1233+
struct_span_err!(
1234+
self.err_handler(),
1235+
t.span,
1236+
E0316,
1237+
"nested quantification of lifetimes"
1238+
)
1239+
.emit();
1240+
}
1241+
}
1242+
GenericBound::Outlives(_) => {}
1243+
}
1244+
}
1245+
}
1246+
}
1247+
_ => {}
1248+
}
1249+
self.visit_where_predicate(predicate);
1250+
}
12181251
}
12191252

12201253
fn visit_generic_param(&mut self, param: &'a GenericParam) {
@@ -1263,14 +1296,6 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
12631296
visit::walk_pat(self, pat)
12641297
}
12651298

1266-
fn visit_where_predicate(&mut self, p: &'a WherePredicate) {
1267-
if let &WherePredicate::BoundPredicate(ref bound_predicate) = p {
1268-
// A type binding, eg `for<'c> Foo: Send+Clone+'c`
1269-
self.check_late_bound_lifetime_defs(&bound_predicate.bound_generic_params);
1270-
}
1271-
visit::walk_where_predicate(self, p);
1272-
}
1273-
12741299
fn visit_poly_trait_ref(&mut self, t: &'a PolyTraitRef, m: &'a TraitBoundModifier) {
12751300
self.check_late_bound_lifetime_defs(&t.bound_generic_params);
12761301
visit::walk_poly_trait_ref(self, t, m);

‎compiler/rustc_middle/src/middle/region.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -235,18 +235,6 @@ pub struct ScopeTree {
235235
/// escape into 'static and should have no local cleanup scope.
236236
rvalue_scopes: FxHashMap<hir::ItemLocalId, Option<Scope>>,
237237

238-
/// Encodes the hierarchy of fn bodies. Every fn body (including
239-
/// closures) forms its own distinct region hierarchy, rooted in
240-
/// the block that is the fn body. This map points from the ID of
241-
/// that root block to the ID of the root block for the enclosing
242-
/// fn, if any. Thus the map structures the fn bodies into a
243-
/// hierarchy based on their lexical mapping. This is used to
244-
/// handle the relationships between regions in a fn and in a
245-
/// closure defined by that fn. See the "Modeling closures"
246-
/// section of the README in infer::region_constraints for
247-
/// more details.
248-
closure_tree: FxHashMap<hir::ItemLocalId, hir::ItemLocalId>,
249-
250238
/// If there are any `yield` nested within a scope, this map
251239
/// stores the `Span` of the last one and its index in the
252240
/// postorder of the Visitor traversal on the HIR.
@@ -356,23 +344,6 @@ impl ScopeTree {
356344
self.destruction_scopes.get(&n).cloned()
357345
}
358346

359-
/// Records that `sub_closure` is defined within `sup_closure`. These IDs
360-
/// should be the ID of the block that is the fn body, which is
361-
/// also the root of the region hierarchy for that fn.
362-
pub fn record_closure_parent(
363-
&mut self,
364-
sub_closure: hir::ItemLocalId,
365-
sup_closure: hir::ItemLocalId,
366-
) {
367-
debug!(
368-
"record_closure_parent(sub_closure={:?}, sup_closure={:?})",
369-
sub_closure, sup_closure
370-
);
371-
assert!(sub_closure != sup_closure);
372-
let previous = self.closure_tree.insert(sub_closure, sup_closure);
373-
assert!(previous.is_none());
374-
}
375-
376347
pub fn record_var_scope(&mut self, var: hir::ItemLocalId, lifetime: Scope) {
377348
debug!("record_var_scope(sub={:?}, sup={:?})", var, lifetime);
378349
assert!(var != lifetime.item_local_id());
@@ -474,7 +445,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for ScopeTree {
474445
ref var_map,
475446
ref destruction_scopes,
476447
ref rvalue_scopes,
477-
ref closure_tree,
478448
ref yield_in_scope,
479449
} = *self;
480450

@@ -488,7 +458,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for ScopeTree {
488458
var_map.hash_stable(hcx, hasher);
489459
destruction_scopes.hash_stable(hcx, hasher);
490460
rvalue_scopes.hash_stable(hcx, hasher);
491-
closure_tree.hash_stable(hcx, hasher);
492461
yield_in_scope.hash_stable(hcx, hasher);
493462
}
494463
}

‎compiler/rustc_passes/src/region.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ use std::mem;
2323

2424
#[derive(Debug, Copy, Clone)]
2525
pub struct Context {
26-
/// The root of the current region tree. This is typically the id
27-
/// of the innermost fn body. Each fn forms its own disjoint tree
28-
/// in the region hierarchy. These fn bodies are themselves
29-
/// arranged into a tree. See the "Modeling closures" section of
30-
/// the README in `rustc_trait_selection::infer::region_constraints`
31-
/// for more details.
32-
root_id: Option<hir::ItemLocalId>,
33-
3426
/// The scope that contains any new variables declared, plus its depth in
3527
/// the scope tree.
3628
var_parent: Option<(Scope, ScopeDepth)>,
@@ -743,11 +735,6 @@ impl<'tcx> Visitor<'tcx> for RegionResolutionVisitor<'tcx> {
743735
let outer_pessimistic_yield = mem::replace(&mut self.pessimistic_yield, false);
744736
self.terminating_scopes.insert(body.value.hir_id.local_id);
745737

746-
if let Some(root_id) = self.cx.root_id {
747-
self.scope_tree.record_closure_parent(body.value.hir_id.local_id, root_id);
748-
}
749-
self.cx.root_id = Some(body.value.hir_id.local_id);
750-
751738
self.enter_scope(Scope { id: body.value.hir_id.local_id, data: ScopeData::CallSite });
752739
self.enter_scope(Scope { id: body.value.hir_id.local_id, data: ScopeData::Arguments });
753740

@@ -824,7 +811,7 @@ fn region_scope_tree(tcx: TyCtxt<'_>, def_id: DefId) -> &ScopeTree {
824811
tcx,
825812
scope_tree: ScopeTree::default(),
826813
expr_and_pat_count: 0,
827-
cx: Context { root_id: None, parent: None, var_parent: None },
814+
cx: Context { parent: None, var_parent: None },
828815
terminating_scopes: Default::default(),
829816
pessimistic_yield: false,
830817
fixup_scopes: vec![],

‎compiler/rustc_resolve/src/late/lifetimes.rs

Lines changed: 219 additions & 412 deletions
Large diffs are not rendered by default.

‎compiler/rustc_trait_selection/src/traits/object_safety.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ fn virtual_call_violation_for_method<'tcx>(
439439
return Some(MethodViolationCode::WhereClauseReferencesSelf);
440440
}
441441

442-
let receiver_ty =
443-
tcx.liberate_late_bound_regions(method.def_id, sig.map_bound(|sig| sig.inputs()[0]));
442+
let receiver_ty = tcx.liberate_late_bound_regions(method.def_id, sig.input(0));
444443

445444
// Until `unsized_locals` is fully implemented, `self: Self` can't be dispatched on.
446445
// However, this is already considered object-safe. We allow it as a special case here.

‎compiler/rustc_typeck/src/check/coercion.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
973973
}
974974
};
975975
if let (Some(a_sig), Some(b_sig)) = (a_sig, b_sig) {
976+
// Intrinsics are not coercible to function pointers.
977+
if a_sig.abi() == Abi::RustIntrinsic
978+
|| a_sig.abi() == Abi::PlatformIntrinsic
979+
|| b_sig.abi() == Abi::RustIntrinsic
980+
|| b_sig.abi() == Abi::PlatformIntrinsic
981+
{
982+
return Err(TypeError::IntrinsicCast);
983+
}
976984
// The signature must match.
977985
let a_sig = self.normalize_associated_types_in(new.span, a_sig);
978986
let b_sig = self.normalize_associated_types_in(new.span, b_sig);

‎library/std/src/env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ impl DoubleEndedIterator for Args {
799799
#[stable(feature = "std_debug", since = "1.16.0")]
800800
impl fmt::Debug for Args {
801801
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
802-
f.debug_struct("Args").field("inner", &self.inner.inner.inner_debug()).finish()
802+
f.debug_struct("Args").field("inner", &self.inner.inner).finish()
803803
}
804804
}
805805

@@ -840,7 +840,7 @@ impl DoubleEndedIterator for ArgsOs {
840840
#[stable(feature = "std_debug", since = "1.16.0")]
841841
impl fmt::Debug for ArgsOs {
842842
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
843-
f.debug_struct("ArgsOs").field("inner", &self.inner.inner_debug()).finish()
843+
f.debug_struct("ArgsOs").field("inner", &self.inner).finish()
844844
}
845845
}
846846

‎library/std/src/sys/hermit/args.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::ffi::OsString;
2+
use crate::fmt;
23
use crate::marker::PhantomData;
34
use crate::vec;
45

@@ -22,9 +23,9 @@ pub struct Args {
2223
_dont_send_or_sync_me: PhantomData<*mut ()>,
2324
}
2425

25-
impl Args {
26-
pub fn inner_debug(&self) -> &[OsString] {
27-
self.iter.as_slice()
26+
impl fmt::Debug for Args {
27+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
28+
self.iter.as_slice().fmt(f)
2829
}
2930
}
3031

‎library/std/src/sys/sgx/args.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use super::abi::usercalls::{alloc, raw::ByteBuffer};
22
use crate::ffi::OsString;
3+
use crate::fmt;
34
use crate::slice;
45
use crate::sync::atomic::{AtomicUsize, Ordering};
56
use crate::sys::os_str::Buf;
@@ -31,9 +32,9 @@ pub fn args() -> Args {
3132

3233
pub struct Args(slice::Iter<'static, OsString>);
3334

34-
impl Args {
35-
pub fn inner_debug(&self) -> &[OsString] {
36-
self.0.as_slice()
35+
impl fmt::Debug for Args {
36+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
37+
self.0.as_slice().fmt(f)
3738
}
3839
}
3940

‎library/std/src/sys/unix/args.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#![allow(dead_code)] // runtime init functions not used during testing
77

88
use crate::ffi::OsString;
9+
use crate::fmt;
910
use crate::marker::PhantomData;
1011
use crate::vec;
1112

@@ -29,9 +30,9 @@ pub struct Args {
2930
_dont_send_or_sync_me: PhantomData<*mut ()>,
3031
}
3132

32-
impl Args {
33-
pub fn inner_debug(&self) -> &[OsString] {
34-
self.iter.as_slice()
33+
impl fmt::Debug for Args {
34+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35+
self.iter.as_slice().fmt(f)
3536
}
3637
}
3738

‎library/std/src/sys/unix/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use crate::slice;
2121
use crate::str;
2222
use crate::sys::cvt;
2323
use crate::sys::fd;
24+
use crate::sys::rwlock::{RWLockReadGuard, StaticRWLock};
2425
use crate::sys_common::mutex::{StaticMutex, StaticMutexGuard};
25-
use crate::sys_common::rwlock::{RWLockReadGuard, StaticRWLock};
2626
use crate::vec;
2727

2828
use libc::{c_char, c_int, c_void};

‎library/std/src/sys/unix/rwlock.rs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,55 @@ impl RWLock {
139139
}
140140
}
141141
}
142+
143+
pub struct StaticRWLock(RWLock);
144+
145+
impl StaticRWLock {
146+
pub const fn new() -> StaticRWLock {
147+
StaticRWLock(RWLock::new())
148+
}
149+
150+
/// Acquires shared access to the underlying lock, blocking the current
151+
/// thread to do so.
152+
///
153+
/// The lock is automatically unlocked when the returned guard is dropped.
154+
#[inline]
155+
pub fn read_with_guard(&'static self) -> RWLockReadGuard {
156+
// SAFETY: All methods require static references, therefore self
157+
// cannot be moved between invocations.
158+
unsafe {
159+
self.0.read();
160+
}
161+
RWLockReadGuard(&self.0)
162+
}
163+
164+
/// Acquires write access to the underlying lock, blocking the current thread
165+
/// to do so.
166+
///
167+
/// The lock is automatically unlocked when the returned guard is dropped.
168+
#[inline]
169+
pub fn write_with_guard(&'static self) -> RWLockWriteGuard {
170+
// SAFETY: All methods require static references, therefore self
171+
// cannot be moved between invocations.
172+
unsafe {
173+
self.0.write();
174+
}
175+
RWLockWriteGuard(&self.0)
176+
}
177+
}
178+
179+
pub struct RWLockReadGuard(&'static RWLock);
180+
181+
impl Drop for RWLockReadGuard {
182+
fn drop(&mut self) {
183+
unsafe { self.0.read_unlock() }
184+
}
185+
}
186+
187+
pub struct RWLockWriteGuard(&'static RWLock);
188+
189+
impl Drop for RWLockWriteGuard {
190+
fn drop(&mut self) {
191+
unsafe { self.0.write_unlock() }
192+
}
193+
}

‎library/std/src/sys/unsupported/args.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ pub fn args() -> Args {
99
Args {}
1010
}
1111

12-
impl Args {
13-
pub fn inner_debug(&self) -> &[OsString] {
14-
&[]
12+
impl fmt::Debug for Args {
13+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14+
f.debug_list().finish()
1515
}
1616
}
1717

‎library/std/src/sys/wasi/args.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![deny(unsafe_op_in_unsafe_fn)]
22

33
use crate::ffi::{CStr, OsStr, OsString};
4+
use crate::fmt;
45
use crate::marker::PhantomData;
56
use crate::os::wasi::ffi::OsStrExt;
67
use crate::vec;
@@ -38,9 +39,9 @@ fn maybe_args() -> Option<Vec<OsString>> {
3839
}
3940
}
4041

41-
impl Args {
42-
pub fn inner_debug(&self) -> &[OsString] {
43-
self.iter.as_slice()
42+
impl fmt::Debug for Args {
43+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
44+
self.iter.as_slice().fmt(f)
4445
}
4546
}
4647

‎library/std/src/sys/wasm/args.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use crate::ffi::OsString;
2+
use crate::fmt;
23
use crate::marker::PhantomData;
34
use crate::vec;
45

@@ -17,9 +18,9 @@ pub struct Args {
1718
_dont_send_or_sync_me: PhantomData<*mut ()>,
1819
}
1920

20-
impl Args {
21-
pub fn inner_debug(&self) -> &[OsString] {
22-
self.iter.as_slice()
21+
impl fmt::Debug for Args {
22+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23+
self.iter.as_slice().fmt(f)
2324
}
2425
}
2526

‎library/std/src/sys/windows/args.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,9 @@ pub struct Args {
164164
parsed_args_list: vec::IntoIter<OsString>,
165165
}
166166

167-
pub struct ArgsInnerDebug<'a> {
168-
args: &'a Args,
169-
}
170-
171-
impl<'a> fmt::Debug for ArgsInnerDebug<'a> {
167+
impl fmt::Debug for Args {
172168
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
173-
self.args.parsed_args_list.as_slice().fmt(f)
174-
}
175-
}
176-
177-
impl Args {
178-
pub fn inner_debug(&self) -> ArgsInnerDebug<'_> {
179-
ArgsInnerDebug { args: self }
169+
self.parsed_args_list.as_slice().fmt(f)
180170
}
181171
}
182172

‎library/std/src/sys_common/rwlock.rs

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -86,62 +86,3 @@ impl RWLock {
8686
self.0.destroy()
8787
}
8888
}
89-
90-
// the cfg annotations only exist due to dead code warnings. the code itself is portable
91-
#[cfg(unix)]
92-
pub struct StaticRWLock(RWLock);
93-
94-
#[cfg(unix)]
95-
impl StaticRWLock {
96-
pub const fn new() -> StaticRWLock {
97-
StaticRWLock(RWLock::new())
98-
}
99-
100-
/// Acquires shared access to the underlying lock, blocking the current
101-
/// thread to do so.
102-
///
103-
/// The lock is automatically unlocked when the returned guard is dropped.
104-
#[inline]
105-
pub fn read_with_guard(&'static self) -> RWLockReadGuard {
106-
// SAFETY: All methods require static references, therefore self
107-
// cannot be moved between invocations.
108-
unsafe {
109-
self.0.read();
110-
}
111-
RWLockReadGuard(&self.0)
112-
}
113-
114-
/// Acquires write access to the underlying lock, blocking the current thread
115-
/// to do so.
116-
///
117-
/// The lock is automatically unlocked when the returned guard is dropped.
118-
#[inline]
119-
pub fn write_with_guard(&'static self) -> RWLockWriteGuard {
120-
// SAFETY: All methods require static references, therefore self
121-
// cannot be moved between invocations.
122-
unsafe {
123-
self.0.write();
124-
}
125-
RWLockWriteGuard(&self.0)
126-
}
127-
}
128-
129-
#[cfg(unix)]
130-
pub struct RWLockReadGuard(&'static RWLock);
131-
132-
#[cfg(unix)]
133-
impl Drop for RWLockReadGuard {
134-
fn drop(&mut self) {
135-
unsafe { self.0.read_unlock() }
136-
}
137-
}
138-
139-
#[cfg(unix)]
140-
pub struct RWLockWriteGuard(&'static RWLock);
141-
142-
#[cfg(unix)]
143-
impl Drop for RWLockWriteGuard {
144-
fn drop(&mut self) {
145-
unsafe { self.0.write_unlock() }
146-
}
147-
}

‎src/librustdoc/html/static/rustdoc.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) {
116116
padding-bottom: 6px;
117117
}
118118
h1.fqn {
119+
display: flex;
120+
width: 100%;
119121
border-bottom: 1px dashed;
120122
margin-top: 0;
121123
}
@@ -458,6 +460,13 @@ nav.sub {
458460
font-weight: normal;
459461
}
460462

463+
h1.fqn > .out-of-band {
464+
float: unset;
465+
flex: 1;
466+
text-align: right;
467+
margin-left: 8px;
468+
}
469+
461470
h3.impl > .out-of-band {
462471
font-size: 21px;
463472
}
@@ -1450,10 +1459,6 @@ h4 > .notable-traits {
14501459
padding: 0;
14511460
}
14521461

1453-
.content .in-band {
1454-
width: 100%;
1455-
}
1456-
14571462
.content h4 > .out-of-band {
14581463
position: inherit;
14591464
}

‎src/test/ui/reify-intrinsic.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,12 @@ fn b() {
1212
//~^ ERROR casting
1313
}
1414

15+
fn c() {
16+
let _ = [
17+
std::intrinsics::copy_nonoverlapping::<i32>,
18+
std::intrinsics::copy::<i32>,
19+
//~^ ERROR cannot coerce
20+
];
21+
}
22+
1523
fn main() {}

‎src/test/ui/reify-intrinsic.stderr

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_,
1919
LL | let _ = std::mem::transmute as unsafe extern "rust-intrinsic" fn(isize) -> usize;
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2121

22-
error: aborting due to 2 previous errors
22+
error[E0308]: cannot coerce intrinsics to function pointers
23+
--> $DIR/reify-intrinsic.rs:18:9
24+
|
25+
LL | std::intrinsics::copy::<i32>,
26+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot coerce intrinsics to function pointers
27+
|
28+
= note: expected type `unsafe extern "rust-intrinsic" fn(_, _, _) {copy_nonoverlapping::<i32>}`
29+
found fn item `unsafe extern "rust-intrinsic" fn(_, _, _) {std::intrinsics::copy::<i32>}`
30+
31+
error: aborting due to 3 previous errors
2332

2433
Some errors have detailed explanations: E0308, E0606.
2534
For more information about an error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)
This repository has been archived.