Skip to content

Rollup of 8 pull requests #136564

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

Merged
merged 32 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
832fcfb
Introduce `DIBuilderBox`, an owning pointer to `DIBuilder`
Zalathar Jan 31, 2025
cd2af2d
Use `LLVMDIBuilderFinalize`
Zalathar Feb 1, 2025
878ab12
Use `LLVMDIBuilderCreateNameSpace`
Zalathar Feb 1, 2025
70d41bc
Use `LLVMDIBuilderCreateLexicalBlock`
Zalathar Feb 1, 2025
949b467
Use `LLVMDIBuilderCreateLexicalBlockFile`
Zalathar Feb 1, 2025
8ddd9c3
Use `LLVMDIBuilderCreateDebugLocation`
Zalathar Feb 1, 2025
5413d2b
Add FIXME for auditing optional parameters passed to DIBuilder
Zalathar Dec 7, 2024
c3f2930
Explain why (some) pointer/length strings are `*const c_uchar`
Zalathar Dec 12, 2024
510de59
rustdoc-json-types: Document that crate name isn't package name.
aDotInTheVoid Feb 1, 2025
f5d5210
rustdoc-book: Clean up section on `--output-format`
aDotInTheVoid Feb 1, 2025
2ea95f8
rustdoc: clean up a bunch of ts-expected-error declarations in main
notriddle Jan 29, 2025
6b016d7
Mark `std::fmt::from_fn` as `#[must_use]`
yotamofek Feb 3, 2025
bcb8565
Contracts core intrinsics.
pnkfelix Dec 2, 2024
777def8
contracts: added lang items that act as hooks for rustc-injected code…
pnkfelix Dec 2, 2024
38eff16
Express contracts as part of function header and lower it to the cont…
celinval Jan 9, 2025
4636dd9
Add tests for nested macro_rules edition behavior
ehuss Feb 3, 2025
ae7eff0
Desugars contract into the internal AST extensions
pnkfelix Dec 3, 2024
b279ff9
demonstrate how to capture state at precondition time and feed into …
pnkfelix Dec 3, 2024
6a6c6b8
Separate contract feature gates for the internal machinery
pnkfelix Dec 3, 2024
804cce4
Refactor contract builtin macro + error handling
celinval Jan 15, 2025
2bb1464
Improve contracts intrisics and remove wrapper function
celinval Jan 17, 2025
2c4923e
Update test output to include check_contracts cfg
celinval Jan 30, 2025
ddbf54b
Rename rustc_contract to contract
celinval Jan 31, 2025
53b8de1
bootstrap: add wrapper macros for `tracing`-gated tracing macros
jieyouxu Jan 31, 2025
d81701b
Rollup merge of #128045 - pnkfelix:rustc-contracts, r=oli-obk
fmease Feb 5, 2025
207777b
Rollup merge of #136263 - notriddle:notriddle/typescript2, r=fmease
fmease Feb 5, 2025
75989e9
Rollup merge of #136375 - Zalathar:llvm-di-builder, r=workingjubilee
fmease Feb 5, 2025
9830837
Rollup merge of #136392 - jieyouxu:wrap-tracing, r=onur-ozkan
fmease Feb 5, 2025
058ed2b
Rollup merge of #136396 - aDotInTheVoid:crate-isnt-package-whyyy, r=G…
fmease Feb 5, 2025
a6ebb87
Rollup merge of #136405 - aDotInTheVoid:unstable-doc, r=notriddle
fmease Feb 5, 2025
ba42006
Rollup merge of #136502 - yotamofek:pr/fmt-from-fn-must-use, r=dtolnay
fmease Feb 5, 2025
c20a58d
Rollup merge of #136509 - ehuss:nested-macro-rules-edition, r=jieyouxu
fmease Feb 5, 2025
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
23 changes: 23 additions & 0 deletions tests/ui/editions/auxiliary/nested_macro_rules_dep_2021.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//@ edition: 2021

#[macro_export]
macro_rules! make_macro_with_input {
($i:ident) => {
macro_rules! macro_inner_input {
() => {
pub fn $i() {}
};
}
};
}

#[macro_export]
macro_rules! make_macro {
() => {
macro_rules! macro_inner {
() => {
pub fn gen() {}
};
}
};
}
23 changes: 23 additions & 0 deletions tests/ui/editions/auxiliary/nested_macro_rules_dep_2024.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//@ edition: 2024

#[macro_export]
macro_rules! make_macro_with_input {
($i:ident) => {
macro_rules! macro_inner_input {
() => {
pub fn $i() {}
};
}
};
}

#[macro_export]
macro_rules! make_macro {
() => {
macro_rules! macro_inner {
() => {
pub fn gen() {}
};
}
};
}
27 changes: 27 additions & 0 deletions tests/ui/editions/nested-macro-rules-edition.e2021.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
error: expected identifier, found reserved keyword `gen`
--> $DIR/nested-macro-rules-edition.rs:30:5
|
LL | macro_inner_input!{}
| ^^^^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword
|
= note: this error originates in the macro `macro_inner_input` (in Nightly builds, run with -Z macro-backtrace for more info)
help: escape `gen` to use it as an identifier
|
LL | nested_macro_rules_dep::make_macro_with_input!{r#gen}
| ++

error: expected identifier, found reserved keyword `gen`
--> $DIR/nested-macro-rules-edition.rs:35:5
|
LL | macro_inner!{}
| ^^^^^^^^^^^^^^ expected identifier, found reserved keyword
|
= note: this error originates in the macro `macro_inner` (in Nightly builds, run with -Z macro-backtrace for more info)
help: escape `gen` to use it as an identifier
--> $DIR/auxiliary/nested_macro_rules_dep_2024.rs:19:24
|
LL | pub fn r#gen() {}
| ++

error: aborting due to 2 previous errors

39 changes: 39 additions & 0 deletions tests/ui/editions/nested-macro-rules-edition.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// This checks the behavior of how nested macro_rules definitions are handled
// with regards to edition spans. Prior to https://github.com/rust-lang/rust/pull/133274,
// the compiler would compile the inner macro with the edition of the local crate.
// Afterwards, it uses the edition where the macro was *defined*.
//
// Unfortunately macro_rules compiler discards the edition of any *input* that
// was used to generate the macro. This is possibly not the behavior that we
// want. If we want to keep with the philosophy that code should follow the
// edition rules of the crate where it is written, then presumably we would
// want the input tokens to retain the edition of where they were written.
//
// See https://github.com/rust-lang/rust/issues/135669 for more.
//
// This has two revisions, one where local=2021 and the dep=2024. The other
// revision is vice-versa.

//@ revisions: e2021 e2024
//@[e2021] edition:2021
//@[e2024] edition:2024
//@[e2021] aux-crate: nested_macro_rules_dep=nested_macro_rules_dep_2024.rs
//@[e2024] aux-crate: nested_macro_rules_dep=nested_macro_rules_dep_2021.rs
//@[e2024] check-pass

mod with_input {
// If we change the macro_rules input behavior, then this should pass when
// local edition is 2021 because `gen` is written in a context with 2021
// behavior. For local edition 2024, the reverse would be true and this
// should fail.
nested_macro_rules_dep::make_macro_with_input!{gen}
macro_inner_input!{}
//[e2021]~^ ERROR found reserved keyword
}
mod no_input {
nested_macro_rules_dep::make_macro!{}
macro_inner!{}
//[e2021]~^ ERROR found reserved keyword
}

fn main() {}
Loading