Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #127696

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6bd68fc
Run filecheck on dest-prop/branch.rs
CastilloDel Apr 14, 2024
f238eba
Run filecheck on dest-prop/copy_propagation.rs
CastilloDel Apr 14, 2024
853311c
Run filecheck on dest-prop/cycle.rs
CastilloDel Apr 14, 2024
0692090
Run filecheck on dest-prop/dead_stores_79191.rs and dead_stores_bette…
CastilloDel Apr 14, 2024
f0f867e
Run filecheck on dest-prop/simple.rs
CastilloDel Apr 14, 2024
2d5a483
Acknowledge comments
CastilloDel Jun 26, 2024
a5dc082
Use windows_targets macro for alloc
ChrisDenton Jul 5, 2024
e136f08
Add experimental raw-dylib feature to std
ChrisDenton Jul 5, 2024
4819270
use "bootstrap" instead of "rustbuild" in comments and docs
onur-ozkan Jul 6, 2024
99721c8
Clear `inner_attr_ranges` regularly.
nnethercote Jul 8, 2024
a47ae57
Use an `@` pattern to shorten some code.
nnethercote Jul 8, 2024
b162013
Use iterator normally in `make_attr_token_stream`.
nnethercote Jul 8, 2024
a88c4d6
Split the stack in `make_attr_token_stream`.
nnethercote Jul 8, 2024
f552794
Move `Spacing` into `FlatToken`.
nnethercote Jul 8, 2024
2a3e22b
Promote the `wasm32-wasip2` target to Tier 2
alexcrichton Jun 24, 2024
1afdd45
Update how wasm-component-ld is built
alexcrichton Jul 9, 2024
4cd6eee
Unconditionally use stage0 build compiler
alexcrichton Jul 9, 2024
8a390ba
Change empty replace range condition.
nnethercote Jul 10, 2024
fee1525
Rework `Attribute::get_tokens`.
nnethercote Jul 10, 2024
d8b6aa6
Use `cfg_attr` as a name more.
nnethercote Jul 10, 2024
d6ebbbf
Factor out `AttrsTarget` flattening code.
nnethercote Jul 10, 2024
478ba59
Add some comments.
nnethercote Jul 10, 2024
7fc6943
Use ManuallyDrop in BufWriter::into_parts
saethlin Jul 12, 2024
fc0d1dc
use `ModeToolBootstrap` for run-make-support's crate tests
onur-ozkan Jul 13, 2024
41070bd
explain why we use in-tree std for compiletest
onur-ozkan Jul 13, 2024
e9e351b
Rollup merge of #122300 - CastilloDel:master, r=cjgillot
workingjubilee Jul 13, 2024
8b4f708
Rollup merge of #126967 - alexcrichton:wasm32-wasip2-tier-2, r=Mark-S…
workingjubilee Jul 13, 2024
d68c340
Rollup merge of #127370 - ChrisDenton:win-sys, r=Mark-Simulacrum
workingjubilee Jul 13, 2024
2db961b
Rollup merge of #127434 - onur-ozkan:use-bootstrap-instead-of-rustbui…
workingjubilee Jul 13, 2024
ffec779
Rollup merge of #127477 - nnethercote:tweak-inner_attr_ranges, r=petr…
workingjubilee Jul 13, 2024
f55f360
Rollup merge of #127558 - nnethercote:more-Attribute-cleanups, r=petr…
workingjubilee Jul 13, 2024
c0235de
Rollup merge of #127659 - saethlin:manually-drop-bufwriter, r=joboet
workingjubilee Jul 13, 2024
dc0c76f
Rollup merge of #127677 - onur-ozkan:use-correct-modes, r=Kobzol
workingjubilee Jul 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 154 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,7 @@ dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
"rustc-std-workspace-core",
"serde",
]

[[package]]
Expand Down Expand Up @@ -1880,6 +1881,12 @@ dependencies = [
"syn 2.0.67",
]

[[package]]
name = "id-arena"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"

[[package]]
name = "ident_case"
version = "1.0.1"
Expand Down Expand Up @@ -2109,6 +2116,12 @@ version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760"

[[package]]
name = "lexopt"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baff4b617f7df3d896f97fe922b64817f6cd9a756bb81d40f8883f2f66dcb401"

[[package]]
name = "libc"
version = "0.2.155"
Expand Down Expand Up @@ -2623,7 +2636,7 @@ dependencies = [
"indexmap",
"memchr",
"ruzstd 0.5.0",
"wasmparser",
"wasmparser 0.118.2",
]

[[package]]
Expand Down Expand Up @@ -3425,7 +3438,7 @@ dependencies = [
"object 0.34.0",
"regex",
"similar",
"wasmparser",
"wasmparser 0.118.2",
]

[[package]]
Expand Down Expand Up @@ -3812,7 +3825,7 @@ dependencies = [
"thin-vec",
"thorin-dwp",
"tracing",
"wasm-encoder",
"wasm-encoder 0.200.0",
"windows",
]

Expand Down Expand Up @@ -5256,6 +5269,15 @@ dependencies = [
"color-eyre",
]

[[package]]
name = "spdx"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47317bbaf63785b53861e1ae2d11b80d6b624211d42cb20efcd210ee6f8a14bc"
dependencies = [
"smallvec",
]

[[package]]
name = "spdx-expression"
version = "0.5.2"
Expand Down Expand Up @@ -6304,6 +6326,28 @@ version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"

[[package]]
name = "wasm-component-ld"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "314d932d5e84c9678751b85498b1482b2f32f185744e449d3ce0b1d400376dad"
dependencies = [
"anyhow",
"clap",
"lexopt",
"tempfile",
"wasmparser 0.210.0",
"wat",
"wit-component",
]

[[package]]
name = "wasm-component-ld-wrapper"
version = "0.1.0"
dependencies = [
"wasm-component-ld",
]

[[package]]
name = "wasm-encoder"
version = "0.200.0"
Expand All @@ -6313,6 +6357,40 @@ dependencies = [
"leb128",
]

[[package]]
name = "wasm-encoder"
version = "0.210.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7e3764d9d6edabd8c9e16195e177be0d20f6ab942ad18af52860f12f82bc59a"
dependencies = [
"leb128",
]

[[package]]
name = "wasm-encoder"
version = "0.211.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e7d931a1120ef357f32b74547646b6fa68ea25e377772b72874b131a9ed70d4"
dependencies = [
"leb128",
]

[[package]]
name = "wasm-metadata"
version = "0.210.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "012729d1294907fcb0866f08460ab95426a6d0b176a599619b84cac7653452b4"
dependencies = [
"anyhow",
"indexmap",
"serde",
"serde_derive",
"serde_json",
"spdx",
"wasm-encoder 0.210.0",
"wasmparser 0.210.0",
]

[[package]]
name = "wasmparser"
version = "0.118.2"
Expand All @@ -6323,6 +6401,42 @@ dependencies = [
"semver",
]

[[package]]
name = "wasmparser"
version = "0.210.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7bbcd21e7581619d9f6ca00f8c4f08f1cacfe58bf63f83af57cd0476f1026f5"
dependencies = [
"ahash",
"bitflags 2.5.0",
"hashbrown",
"indexmap",
"semver",
"serde",
]

[[package]]
name = "wast"
version = "211.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b25506dd82d00da6b14a87436b3d52b1d264083fa79cdb72a0d1b04a8595ccaa"
dependencies = [
"bumpalo",
"leb128",
"memchr",
"unicode-width",
"wasm-encoder 0.211.1",
]

[[package]]
name = "wat"
version = "1.211.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb716ca6c86eecac2d82541ffc39860118fc0af9309c4f2670637bea2e1bdd7d"
dependencies = [
"wast",
]

[[package]]
name = "winapi"
version = "0.3.9"
Expand Down Expand Up @@ -6550,6 +6664,43 @@ dependencies = [
"memchr",
]

[[package]]
name = "wit-component"
version = "0.210.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a450bdb5d032acf1fa0865451fa0c6f50e62f2d31eaa8dba967c2e2d068694a4"
dependencies = [
"anyhow",
"bitflags 2.5.0",
"indexmap",
"log",
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.210.0",
"wasm-metadata",
"wasmparser 0.210.0",
"wit-parser",
]

[[package]]
name = "wit-parser"
version = "0.210.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60a965cbd439af19a4b44a54a97ab8957d86f02d01320efc9e31c1d3605c6710"
dependencies = [
"anyhow",
"id-arena",
"indexmap",
"log",
"semver",
"serde",
"serde_derive",
"serde_json",
"unicode-xid",
"wasmparser 0.210.0",
]

[[package]]
name = "writeable"
version = "0.5.5"
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ members = [
"src/tools/opt-dist",
"src/tools/coverage-dump",
"src/tools/rustc-perf-wrapper",
"src/tools/wasm-component-ld",
]

exclude = [
Expand Down Expand Up @@ -104,6 +105,9 @@ rustc-demangle.debug = 0
[profile.release.package.lld-wrapper]
debug = 0
strip = true
[profile.release.package.wasm-component-ld-wrapper]
debug = 0
strip = true

[patch.crates-io]
# See comments in `library/rustc-std-workspace-core/README.md` for what's going on
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ python x.py build

Right now, building Rust only works with some known versions of Visual Studio.
If you have a more recent version installed and the build system doesn't
understand, you may need to force rustbuild to use an older version.
understand, you may need to force bootstrap to use an older version.
This can be done by manually calling the appropriate vcvars file before running
the bootstrap.

Expand Down
23 changes: 10 additions & 13 deletions compiler/rustc_ast/src/attr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,18 @@ impl Attribute {
}
}

// Named `get_tokens` to distinguish it from the `<Attribute as HasTokens>::tokens` method.
pub fn get_tokens(&self) -> TokenStream {
match &self.kind {
AttrKind::Normal(normal) => TokenStream::new(
normal
.tokens
.as_ref()
.unwrap_or_else(|| panic!("attribute is missing tokens: {self:?}"))
.to_attr_token_stream()
.to_token_trees(),
),
&AttrKind::DocComment(comment_kind, data) => TokenStream::token_alone(
pub fn token_trees(&self) -> Vec<TokenTree> {
match self.kind {
AttrKind::Normal(ref normal) => normal
.tokens
.as_ref()
.unwrap_or_else(|| panic!("attribute is missing tokens: {self:?}"))
.to_attr_token_stream()
.to_token_trees(),
AttrKind::DocComment(comment_kind, data) => vec![TokenTree::token_alone(
token::DocComment(comment_kind, self.style, data),
self.span,
),
)],
}
}
}
Expand Down
Loading
Loading