Skip to content

Commit

Permalink
Harmonize with upstream
Browse files Browse the repository at this point in the history
added dead_code lint while this needs fix:
rust-lang/libc#3740
  • Loading branch information
Dajamante committed Jun 14, 2024
1 parent 154937c commit ff25b24
Show file tree
Hide file tree
Showing 19 changed files with 30 additions and 574 deletions.
1 change: 1 addition & 0 deletions ferrocene/library/libc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
unused_macros,
unused_macro_rules,
// Ferrocene-specific:
dead_code,
elided_lifetimes_in_paths,
hidden_glob_reexports,
ambiguous_glob_reexports
Expand Down
6 changes: 1 addition & 5 deletions src/bootstrap/download-ci-llvm-stamp
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
Change this file to make users of the `download-ci-llvm` configuration download
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.

<<<<<<< HEAD
Last change is for: https://github.com/rust-lang/rust/pull/120761
Last change is for: https://github.com/rust-lang/rust/pull/125141


(white space intentional to avoid merge conflicts)

Last Ferrocene change is for: https://github.com/ferrocene/ferrocene/pull/98
=======
Last change is for: https://github.com/rust-lang/rust/pull/125141
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
18 changes: 5 additions & 13 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2240,23 +2240,15 @@ impl Config {
/// Return the version it would have used for the given commit.
pub(crate) fn artifact_version_part(&self, commit: &str) -> String {
let (channel, version) = if self.rust_info.is_managed_git_subrepository() {
<<<<<<< HEAD
let mut channel = self.git();
channel.arg("show").arg(format!("{commit}:ferrocene/ci/channel"));
let channel = output(&mut channel);
let mut version = self.git();
version.arg("show").arg(format!("{commit}:ferrocene/version"));
let version = output(&mut version);
(channel.trim().to_owned(), version.trim().to_owned())
=======
let channel = self
.read_file_by_commit(&PathBuf::from("src/ci/channel"), commit)
.read_file_by_commit(&PathBuf::from("ferrocene/ci/channel"), commit)
.trim()
.to_owned();
let version = self
.read_file_by_commit(&PathBuf::from("ferrocene/version"), commit)
.trim()
.to_owned();
let version =
self.read_file_by_commit(&PathBuf::from("src/version"), commit).trim().to_owned();
(channel, version)
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
} else {
let channel = fs::read_to_string(self.src.join("ferrocene/ci/channel"));
let version = fs::read_to_string(self.src.join("ferrocene/version"));
Expand Down
5 changes: 1 addition & 4 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,9 @@ target | std | host | notes
`x86_64-wrs-vxworks` | ? | |
[`x86_64h-apple-darwin`](platform-support/x86_64h-apple-darwin.md) | ✓ | ✓ | macOS with late-gen Intel (at least Haswell)
[`x86_64-unknown-linux-none`](platform-support/x86_64-unknown-linux-none.md) | * | | 64-bit Linux with no libc
<<<<<<< HEAD
`aarch64-unknown-ferrocenecoretest` | ✓ | ✓ | Internal target for tests
=======
`xtensa-esp32-none-elf` | | | Xtensa ESP32
`xtensa-esp32s2-none-elf` | | | Xtensa ESP32-S2
`xtensa-esp32s3-none-elf` | | | Xtensa ESP32-S3
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
`aarch64-unknown-ferrocenecoretest` | ✓ | ✓ | Internal target for tests

[runs on NVIDIA GPUs]: https://github.com/japaric-archived/nvptx#targets
434 changes: 0 additions & 434 deletions src/stage0

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions src/tools/tidy/src/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ const LICENSES: &[&str] = &[
"MIT OR Zlib OR Apache-2.0", // miniz_oxide
"MIT",
"MIT/Apache-2.0",
<<<<<<< HEAD
"Unicode-3.0", // ICU4X_UNICODE
"Unicode-DFS-2016", // tinystr and icu4x
=======
"Unicode-3.0", // icu4x
"Unicode-DFS-2016", // tinystr
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
"Unlicense OR MIT",
"Unlicense/MIT",
"Zlib OR Apache-2.0 OR MIT", // tinyvec
Expand Down Expand Up @@ -684,17 +679,10 @@ fn check_license_exceptions(metadata: &Metadata, exceptions: &[(&str, &str)], ba
let license = match &pkg.license {
Some(license) => license,
None => {
<<<<<<< HEAD
if pkg.name == "ring" {
// *ring* does not define proper licensing metadata.
continue;
}
if ICU4X_UNICODE_LICENSE_DEPENDENCIES.contains(&pkg.name.as_str()) {
// See the comment on ICU4X_UNICODE_LICENSE_DEPENDENCIES.
continue;
}
=======
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
tidy_error!(bad, "dependency `{}` does not define a license expression", pkg.id);
continue;
}
Expand Down
23 changes: 10 additions & 13 deletions tests/assembly/targets/targets-elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,18 +573,6 @@
//@ revisions: x86_64_wrs_vxworks
//@ [x86_64_wrs_vxworks] compile-flags: --target x86_64-wrs-vxworks
//@ [x86_64_wrs_vxworks] needs-llvm-components: x86
<<<<<<< HEAD

// Ferrocene-specific targets

//@ revisions: i386_lynx_lynxos178
//@ [i386_lynx_lynxos178] compile-flags: --target i386-lynx-lynxos178
//@ [i386_lynx_lynxos178] needs-llvm-components: x86
//@ revisions: aarch64_unknown_ferrocenecoretest
//@ [aarch64_unknown_ferrocenecoretest] compile-flags: --target aarch64-unknown-ferrocenecoretest
//@ [aarch64_unknown_ferrocenecoretest] needs-llvm-components: aarch64

=======
// FIXME: disabled since it requires a custom LLVM until the upstream LLVM adds support for the target (https://github.com/espressif/llvm-project/issues/4)
/*
revisions: xtensa_esp32_none_elf
Expand All @@ -597,7 +585,16 @@
[xtensa_esp32s3_none_elf] compile-flags: --target xtensa-esp32s3-none-elf
[xtensa_esp32s3_none_elf] needs-llvm-components: xtensa
*/
>>>>>>> pull-upstream-temp--do-not-use-for-real-code

// Ferrocene-specific targets

//@ revisions: i386_lynx_lynxos178
//@ [i386_lynx_lynxos178] compile-flags: --target i386-lynx-lynxos178
//@ [i386_lynx_lynxos178] needs-llvm-components: x86
//@ revisions: aarch64_unknown_ferrocenecoretest
//@ [aarch64_unknown_ferrocenecoretest] compile-flags: --target aarch64-unknown-ferrocenecoretest
//@ [aarch64_unknown_ferrocenecoretest] needs-llvm-components: aarch64

// Sanity-check that each target can produce assembly code.

#![feature(no_core, lang_items)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@
let mut _3: !;

+ coverage ExpressionId(0) => Expression { lhs: Counter(0), op: Add, rhs: Counter(1) };
<<<<<<< HEAD
+ coverage Code(Counter(0)) => $DIR/instrument_coverage.rs:11:1 - 11:11;
+ coverage Code(Expression(0)) => $DIR/instrument_coverage.rs:12:5 - 13:17;
+ coverage Code(Expression(0)) => $DIR/instrument_coverage.rs:13:12 - 13:17;
+ coverage Code(Counter(0)) => $DIR/instrument_coverage.rs:14:13 - 14:18;
+ coverage Code(Counter(1)) => $DIR/instrument_coverage.rs:15:10 - 15:11;
+ coverage Code(Counter(0)) => $DIR/instrument_coverage.rs:17:1 - 17:2;
=======
+ coverage Code(Counter(0)) => $DIR/instrument_coverage.rs:10:1 - 10:11;
+ coverage Code(Expression(0)) => $DIR/instrument_coverage.rs:12:12 - 12:17;
+ coverage Code(Counter(0)) => $DIR/instrument_coverage.rs:13:13 - 13:18;
+ coverage Code(Counter(1)) => $DIR/instrument_coverage.rs:14:10 - 14:11;
+ coverage Code(Counter(0)) => $DIR/instrument_coverage.rs:16:1 - 16:2;
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
+
bb0: {
+ Coverage::CounterIncrement(0);
Expand Down
40 changes: 0 additions & 40 deletions tests/run-make/pgo-branch-weights/Makefile

This file was deleted.

3 changes: 3 additions & 0 deletions tests/run-make/pgo-branch-weights/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ fn main() {
.stdin(fs_wrapper::read("interesting.ll"))
.run();
}

// ferrocene-annotations: um_rustc_C_link_args
// ferrocene-annotations: um_rustc_C_codegen_units
12 changes: 0 additions & 12 deletions tests/run-make/prefer-dylib/Makefile

This file was deleted.

2 changes: 2 additions & 0 deletions tests/run-make/prefer-dylib/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ fn main() {
// This time the command should fail.
run_fail("foo");
}

// ferrocene-annotations: um_rustc_C_prefer_dynamic
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
warning: due to multiple output types requested, the explicitly specified output file name will be adapted for each output type

warning: ignoring --out-dir flag due to -o flag

warning: 2 warnings emitted
warning: 1 warning emitted

4 changes: 0 additions & 4 deletions tests/ui/ferrocene/compiler-arguments/o/o_o.stderr

This file was deleted.

4 changes: 0 additions & 4 deletions tests/ui/ferrocene/compiler-arguments/o/o_space-delim.stderr

This file was deleted.

8 changes: 2 additions & 6 deletions tests/ui/impl-trait/equality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ impl Leak for i32 {
fn leak(self) -> i32 { self }
}

<<<<<<< HEAD
fn main() {}
fn main() {
}

// ferrocene-annotations: fls_46ork6fz5o2e
// Implementation Coherence
Expand All @@ -56,7 +56,3 @@ fn main() {}
//
// ferrocene-annotations: fls_exe4zodlwfez
// Type Unification
=======
fn main() {
}
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
6 changes: 1 addition & 5 deletions tests/ui/unused-crate-deps/deny-cmdline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
//@ aux-crate:bar=bar.rs

fn main() {}
<<<<<<< HEAD
//~^ ERROR external crate `bar` unused in
//~^ ERROR extern crate `bar` is unused in

// ferrocene-annotations: um_rustc_D
=======
//~^ ERROR extern crate `bar` is unused in
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
6 changes: 1 addition & 5 deletions tests/ui/unused-crate-deps/warn-cmdline-static.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
//@ no-prefer-dynamic

fn main() {}
<<<<<<< HEAD
//~^ WARNING external crate `bar` unused in
//~^ WARNING extern crate `bar` is unused in

// ferrocene-annotations: um_rustc_W
=======
//~^ WARNING extern crate `bar` is unused in
>>>>>>> pull-upstream-temp--do-not-use-for-real-code
6 changes: 1 addition & 5 deletions tests/ui/unused-crate-deps/warn-cmdline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
//@ aux-crate:bar=bar.rs

fn main() {}
<<<<<<< HEAD
//~^ WARNING external crate `bar` unused in
//~^ WARNING extern crate `bar` is unused in

// ferrocene-annotations: um_rustc_W
=======
//~^ WARNING extern crate `bar` is unused in
>>>>>>> pull-upstream-temp--do-not-use-for-real-code

0 comments on commit ff25b24

Please sign in to comment.