Skip to content

Commit 7051754

Browse files
committed
Auto merge of #46430 - kennytm:rollup, r=kennytm
Rollup of 13 pull requests - Successful merges: #45880, #46280, #46373, #46376, #46385, #46386, #46387, #46392, #46400, #46401, #46405, #46412, #46421 - Failed merges:
2 parents bb42071 + 5617477 commit 7051754

File tree

34 files changed

+219
-49
lines changed

34 files changed

+219
-49
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ config.stamp
9595
keywords.md
9696
lexer.ml
9797
src/etc/dl
98-
src/librustc_llvm/llvmdeps.rs
9998
tmp.*.rs
10099
version.md
101100
version.ml

src/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Step for CargoBook {
159159

160160
let target = self.target;
161161
let name = self.name;
162-
let src = PathBuf::from("src/tools/cargo/src/doc/book");
162+
let src = build.src.join("src/tools/cargo/src/doc/book");
163163

164164
let out = build.doc_out(target);
165165
t!(fs::create_dir_all(&out));

src/bootstrap/native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ impl Step for TestHelpers {
316316
.warnings(false)
317317
.debug(false)
318318
.file(build.src.join("src/rt/rust_test_helpers.c"))
319-
.compile("librust_test_helpers.a");
319+
.compile("rust_test_helpers");
320320
}
321321
}
322322

src/build_helper/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ pub fn mtime(path: &Path) -> FileTime {
190190
///
191191
/// Uses last-modified time checks to verify this.
192192
pub fn up_to_date(src: &Path, dst: &Path) -> bool {
193+
if !dst.exists() {
194+
return false;
195+
}
193196
let threshold = mtime(dst);
194197
let meta = match fs::metadata(src) {
195198
Ok(meta) => meta,

src/liballoc_jemalloc/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ fn main() {
140140
cc::Build::new()
141141
.flag("-fvisibility=hidden")
142142
.file("pthread_atfork_dummy.c")
143-
.compile("libpthread_atfork_dummy.a");
143+
.compile("pthread_atfork_dummy");
144144
}
145145
}

src/libprofiler_builtins/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ fn main() {
5656
cfg.file(Path::new("../libcompiler_builtins/compiler-rt/lib/profile").join(src));
5757
}
5858

59-
cfg.compile("libprofiler-rt.a");
59+
cfg.compile("profiler-rt");
6060
}

src/librustc/lint/builtin.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ declare_lint! {
222222
"detect mut variables which don't need to be mutable"
223223
}
224224

225+
declare_lint! {
226+
pub COERCE_NEVER,
227+
Deny,
228+
"detect coercion to !"
229+
}
230+
225231
/// Does nothing as a lint pass, but registers some `Lint`s
226232
/// which are used by other parts of the compiler.
227233
#[derive(Copy, Clone)]
@@ -263,7 +269,8 @@ impl LintPass for HardwiredLints {
263269
LATE_BOUND_LIFETIME_ARGUMENTS,
264270
DEPRECATED,
265271
UNUSED_UNSAFE,
266-
UNUSED_MUT
272+
UNUSED_MUT,
273+
COERCE_NEVER
267274
)
268275
}
269276
}

src/librustc/traits/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
282282
/// ### The type parameter `N`
283283
///
284284
/// See explanation on `VtableImplData`.
285-
#[derive(Clone)]
285+
#[derive(Clone, RustcEncodable, RustcDecodable)]
286286
pub enum Vtable<'tcx, N> {
287287
/// Vtable identifying a particular impl.
288288
VtableImpl(VtableImplData<'tcx, N>),
@@ -327,14 +327,14 @@ pub enum Vtable<'tcx, N> {
327327
/// is `Obligation`, as one might expect. During trans, however, this
328328
/// is `()`, because trans only requires a shallow resolution of an
329329
/// impl, and nested obligations are satisfied later.
330-
#[derive(Clone, PartialEq, Eq)]
330+
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable)]
331331
pub struct VtableImplData<'tcx, N> {
332332
pub impl_def_id: DefId,
333333
pub substs: &'tcx Substs<'tcx>,
334334
pub nested: Vec<N>
335335
}
336336

337-
#[derive(Clone, PartialEq, Eq)]
337+
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable)]
338338
pub struct VtableGeneratorData<'tcx, N> {
339339
pub closure_def_id: DefId,
340340
pub substs: ty::ClosureSubsts<'tcx>,
@@ -343,7 +343,7 @@ pub struct VtableGeneratorData<'tcx, N> {
343343
pub nested: Vec<N>
344344
}
345345

346-
#[derive(Clone, PartialEq, Eq)]
346+
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable)]
347347
pub struct VtableClosureData<'tcx, N> {
348348
pub closure_def_id: DefId,
349349
pub substs: ty::ClosureSubsts<'tcx>,
@@ -352,20 +352,20 @@ pub struct VtableClosureData<'tcx, N> {
352352
pub nested: Vec<N>
353353
}
354354

355-
#[derive(Clone)]
355+
#[derive(Clone, RustcEncodable, RustcDecodable)]
356356
pub struct VtableAutoImplData<N> {
357357
pub trait_def_id: DefId,
358358
pub nested: Vec<N>
359359
}
360360

361-
#[derive(Clone)]
361+
#[derive(Clone, RustcEncodable, RustcDecodable)]
362362
pub struct VtableBuiltinData<N> {
363363
pub nested: Vec<N>
364364
}
365365

366366
/// A vtable for some object-safe trait `Foo` automatically derived
367367
/// for the object type `Foo`.
368-
#[derive(PartialEq,Eq,Clone)]
368+
#[derive(PartialEq, Eq, Clone, RustcEncodable, RustcDecodable)]
369369
pub struct VtableObjectData<'tcx, N> {
370370
/// `Foo` upcast to the obligation trait. This will be some supertrait of `Foo`.
371371
pub upcast_trait_ref: ty::PolyTraitRef<'tcx>,
@@ -378,7 +378,7 @@ pub struct VtableObjectData<'tcx, N> {
378378
pub nested: Vec<N>,
379379
}
380380

381-
#[derive(Clone, PartialEq, Eq)]
381+
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable)]
382382
pub struct VtableFnPointerData<'tcx, N> {
383383
pub fn_ty: Ty<'tcx>,
384384
pub nested: Vec<N>

src/librustc_lint/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
247247
id: LintId::of(SAFE_PACKED_BORROWS),
248248
reference: "issue #46043 <https://github.com/rust-lang/rust/issues/46043>",
249249
},
250+
FutureIncompatibleInfo {
251+
id: LintId::of(COERCE_NEVER),
252+
reference: "issue #46325 <https://github.com/rust-lang/rust/issues/46325>",
253+
},
250254

251255
]);
252256

0 commit comments

Comments
 (0)