Aaron1011/Aaron1011.github.io_old 0
Gtihub Pages
Tiny http daemon that answers acme challenges and redirects everything else to https
Actor framework for Rust
framework for composable networking services
Actix web is a small, pragmatic, and extremely fast rust web framework.
A Minecraft Mod about lots of useful gadgets and things!
🐇 Fuzzing Rust code with american-fuzzy-lop
A cross-platform, GPU-accelerated terminal emulator
An HTML sanitizer
startedTeXitoi/keyberon
started time in 35 minutes
issue openedrust-lang/miri
Allow blessing test stdout/stderr
Currently, I need to update the captured stdout/stderr for each test individually whenever it changes. It would be nice to have a ./miri test --bless mode, which would work like ./x.py test --bless
created time in an hour
push eventAaron1011/rust
commit sha a660844c2d9594c5715452cc2e5926331812377c
Fix test
push time in 3 hours
pull request commentrust-lang/rust
Switch `mutable_borrow_reservation_conflict` lint to deny by default
A crater run to see impact might be useful
This was done in https://github.com/rust-lang/rust/pull/76104#issuecomment-696983238
comment created time in 19 hours
Pull request review commentrust-lang/rust
pub fn expand_assert<'cx>( // `core::panic` and `std::panic` are different macros, so we use call-site // context to pick up whichever is currently in scope. let sp = cx.with_call_site_ctxt(sp);- let tokens = custom_message.unwrap_or_else(|| {- TokenStream::from(TokenTree::token(- TokenKind::lit(- token::Str,- Symbol::intern(&format!(- "assertion failed: {}",- pprust::expr_to_string(&cond_expr).escape_debug()- )),- None,- ),- DUMMY_SP,- ))- });- let args = P(MacArgs::Delimited(DelimSpan::from_single(sp), MacDelimiter::Parenthesis, tokens));- let panic_call = MacCall {- path: Path::from_ident(Ident::new(sym::panic, sp)),- args,- prior_type_ascription: None,++ let panic_call = {+ if let Some(tokens) = custom_message {+ // Pass the custom message to panic!().+ cx.expr(+ sp,+ ExprKind::MacCall(MacCall {+ path: Path::from_ident(Ident::new(sym::panic, sp)),+ args: P(MacArgs::Delimited(+ DelimSpan::from_single(sp),+ MacDelimiter::Parenthesis,+ tokens,+ )),+ prior_type_ascription: None,+ }),+ )+ } else {+ // Pass our own message directly to $crate::panicking::panic(),+ // because it might contain `{` and `}` that should always be
My bad - I'm getting all of the various levels of format! mixed up :laughing:
I also thought this was invoking the panic! macro - it's actually invoking the function crate::panicking::panic, which makes much more sense.
comment created time in 20 hours
Pull request review commentrust-lang/rust
pub fn expand_assert<'cx>( // `core::panic` and `std::panic` are different macros, so we use call-site // context to pick up whichever is currently in scope. let sp = cx.with_call_site_ctxt(sp);- let tokens = custom_message.unwrap_or_else(|| {- TokenStream::from(TokenTree::token(- TokenKind::lit(- token::Str,- Symbol::intern(&format!(- "assertion failed: {}",- pprust::expr_to_string(&cond_expr).escape_debug()- )),- None,- ),- DUMMY_SP,- ))- });- let args = P(MacArgs::Delimited(DelimSpan::from_single(sp), MacDelimiter::Parenthesis, tokens));- let panic_call = MacCall {- path: Path::from_ident(Ident::new(sym::panic, sp)),- args,- prior_type_ascription: None,++ let panic_call = {+ if let Some(tokens) = custom_message {+ // Pass the custom message to panic!().+ cx.expr(+ sp,+ ExprKind::MacCall(MacCall {+ path: Path::from_ident(Ident::new(sym::panic, sp)),+ args: P(MacArgs::Delimited(+ DelimSpan::from_single(sp),+ MacDelimiter::Parenthesis,+ tokens,+ )),+ prior_type_ascription: None,+ }),+ )+ } else {+ // Pass our own message directly to $crate::panicking::panic(),+ // because it might contain `{` and `}` that should always be
It always contains {} (in "assertion failed: {}"), right?
comment created time in 20 hours
pull request commentrust-lang/rust
Rewrite `collect_tokens` implementations to use a flattened buffer
@bors r=petrochenkov
comment created time in 21 hours
push eventAaron1011/rust
commit sha 593fdd3d45d7565e34dc429788fa81ca2e25a2d4
Rewrite `collect_tokens` implementations to use a flattened buffer Instead of trying to collect tokens at each depth, we 'flatten' the stream as we go allong, pushing open/close delimiters to our buffer just like regular tokens. One capturing is complete, we reconstruct a nested `TokenTree::Delimited` structure, producing a normal `TokenStream`. The reconstructed `TokenStream` is not created immediately - instead, it is produced on-demand by a closure (wrapped in a new `LazyTokenStream` type). This closure stores a clone of the original `TokenCursor`, plus a record of the number of calls to `next()/next_desugared()`. This is sufficient to reconstruct the tokenstream seen by the callback without storing any additional state. If the tokenstream is never used (e.g. when a captured `macro_rules!` argument is never passed to a proc macro), we never actually create a `TokenStream`. This implementation has a number of advantages over the previous one: * It is significantly simpler, with no edge cases around capturing the start/end of a delimited group. * It can be easily extended to allow replacing tokens an an arbitrary 'depth' by just using `Vec::splice` at the proper position. This is important for PR #76130, which requires us to track information about attributes along with tokens. * The lazy approach to `TokenStream` construction allows us to easily parse an AST struct, and then decide after the fact whether we need a `TokenStream`. This will be useful when we start collecting tokens for `Attribute` - we can discard the `LazyTokenStream` if the parsed attribute doesn't need tokens (e.g. is a builtin attribute). The performance impact seems to be neglibile (see https://github.com/rust-lang/rust/pull/77250#issuecomment-703960604). There is a small slowdown on a few benchmarks, but it only rises above 1% for incremental builds, where it represents a larger fraction of the much smaller instruction count. There a ~1% speedup on a few other incremental benchmarks - my guess is that the speedups and slowdowns will usually cancel out in practice.
push time in 21 hours
pull request commentrust-lang/rust
Rewrite `collect_tokens` implementations to use a flattened buffer
@petrochenkov: I've addressed your comments
comment created time in 21 hours
push eventAaron1011/rust
commit sha 6fa47c8b5488a3fd57a468590df02a63b5ff837f
Increment `token_cursor.num_next_calls` from a single location
commit sha f33fc5b251e91bf36b07551e9e8d2ef20ca24115
Fix synthesized spacing around floating point literals
push time in 21 hours
push eventAaron1011/rust
commit sha e023158145ece18176a2e93420600ccda0d0bc58
Permit uninhabited enums to cast into ints This essentially reverts part of #6204.
commit sha 990a39596cf3b33e550f2045f78a62970f8d78f8
Prevent ICE on uninhabited MIR interpretation
commit sha a02014280586b53997622c501db00398376967a8
Refactor io/buffered.rs into submodules
commit sha 96229f02402e82914ec6100b28ad2cbdd273a0d4
move buffered.rs to mod.rs
commit sha 6d75cdfc9ed9e6987bd23add6cf3954d2499dce2
Added updated compiler diagnostic
commit sha da700cba08a2b194d19e63d3c51ebadce96fe46b
Stabilize move_ref_pattern
commit sha afb9eeb1b9ea16ca65e38673a0ef3e7be81d7252
Disabled error `E0007` from rustc_error_codes
commit sha 05c9c0ee5dcd935f518db151bee2dc88380fb92f
Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general.
commit sha c4280af8285c61b367a87c8f6eef9876011a8150
Retry fix error reporting suggestions
commit sha 1ff7da6551a7cdf6ace2a9d00e92bbab550334ee
Move `slice::check_range` to `RangeBounds`
commit sha 1095dcab96d524e700b11edf366d45a0fd173fa0
Fix links
commit sha eb63168e007058dad4af758faf1dca449c049777
Fix doctests
commit sha f055b0bb0847ecf08fe452a270faae8324b55b05
Rename method to `assert_len`
commit sha 549f861f7d53811521cf929cf58fb6828a2a88d9
Use correct article in help message for conversion or cast Before it always used `an`; now it uses the correct article for the type.
commit sha 094f14c554c3a1f103a5d6778d4b4e131c297f11
Add article after "to" Also added missing backtick in "you can cast" message.
commit sha 8a6831a7fd3fc624643b50f494212e0ceaad3c28
Say "doesn't" instead of "wouldn't" in convert message
commit sha 13dfbb64d313137b7d3c33067910e90f27bc6345
Suggest imports of unresolved macros
commit sha 479298e05e8177b171c6d6bcd35fc7553b424bee
Re-run tests with --bless
commit sha ea7cf6106864ce7929eb9f3cfe580f05ee418ac8
Don't suggest macros that out of scope
commit sha 0b923d3ca0b7f5a1a611564ee48c1e92f896d79e
add `str::{Split,RSplit}::as_str` methods This commit introduses 2 methods under "str_split_as_str" gate with common signature of `&Split<'a, _> -> &'a str'`. Both of them work like `Chars::as_str` - return unyield part of the inner string.
push time in 21 hours
pull request commentrust-lang/rust
Avoid cloning the contents of a `TokenStream` in a few places
@bors r=petrochenkov
comment created time in a day
push eventAaron1011/rust
commit sha 41942fac7d0711c6b3d0faa69748e22c0eb41388
SsoHashSet reimplemented as a wrapper on top of SsoHashMap SsoHashSet::replace had to be removed because it requires missing API from SsoHashMap. It's not a widely used function, so I think it's ok to omit it for now. EitherIter moved into its own file. Also sprinkled code with #[inline] attributes where appropriate.
commit sha 00e641b91417a0b4489544406f60a1e2babe7c88
lints: clarify rc_buffer and add caveats This didn't display some types properly in the docs due the lack of code formatting. Also, refs for the caveat: https://github.com/rust-lang/rust-clippy/pull/6044#issuecomment-699559082 https://github.com/http-rs/surf/pull/242
commit sha 949b834067bdfbde6080358fae29845d86e2db01
Auto merge of #6090 - Fishrock123:rc_buffer-formatting-caveats, r=yaahc lints: clarify rc_buffer and add caveats This didn't display some types properly in the docs due the lack of code formatting. Also, refs for the caveat: https://github.com/rust-lang/rust-clippy/pull/6044#issuecomment-699559082 https://github.com/http-rs/surf/pull/242 Fwiw I can't get `cargo test` to run, even on nightly. I get: ``` error[E0463]: can't find crate for `rustc_ast` ``` *Please keep the line below* changelog: none, nightly
commit sha 210e89198d72108fbba6de3fa539a8a92c1e7213
Add option to pass a custom codegen backend from a driver
commit sha 798a5cf5bc70eb7d9140b8bed4ed8c48ab16feae
Merge remote-tracking branch 'upstream/master' into rustup
commit sha cd4706413fb891ffe33ef06e0c229d97258fbfaf
Run cargo dev fmt
commit sha 8bf27c5e92af39215a3d1da992a7207dafc883e1
Fix dogfood
commit sha db6fb90bc0d9cbf4ddf1bfa560b9e8db10851a84
Auto merge of #6091 - ebroto:rustup, r=ebroto Rustup changelog: none r? `@ghost`
commit sha 549f861f7d53811521cf929cf58fb6828a2a88d9
Use correct article in help message for conversion or cast Before it always used `an`; now it uses the correct article for the type.
commit sha 92a0668c20b8dea00d8739dce2243113f518b427
SsoHashMap minor refactoring, SSO_ARRAY_SIZE introduced
commit sha 952ec7d06660277dedf3436a9f50952a9caa6523
Rollup merge of #76474 - bjorn3:driver_selected_codegen, r=oli-obk Add option to pass a custom codegen backend from a driver This allows the driver to pass information to the codegen backend. For example the headcrab debugger may in the future want to use cg_clif to JIT code to be injected in the debuggee. This would PR make it possible to tell cg_clif which symbol can be found at which address and to tell it to inject the JITed code into the right process. This PR may also help with https://github.com/rust-lang/miri/pull/1540 by allowing miri to provide a codegen backend that only emits metadata and doesn't perform any codegen. cc @nbaksalyar (headcrab) cc @RalfJung (miri)
commit sha 101e76f117eeefcd2e901bab707de199b030f201
needless arbitrary self: handle macros
commit sha 43c181bac4d88dbe7bdd762688dcf18313f01093
Use `tracing` spans to trace the entire MIR interp stack
commit sha 3f1d2aadd19c3cb71f1d88fb0b0c565808a3c040
Use more efficient scheme for display u128/i128 Add zero padding Add benchmarks for fmt u128 This tests both when there is the max amount of work(all characters used) And least amount of work(1 character used)
commit sha 1b58144af56d8e42adadb1d02dab75da00f5b2ea
Merge remote-tracking branch 'upstream/master' into rustup
commit sha ce678b9ac1aac0cb32a36f88294cabf88de316fc
Auto merge of #6094 - ebroto:rustup, r=ebroto Rustup changelog: none r? `@ghost`
commit sha badf4afdd5010fa057d42c0fce56afd10eca54f7
core::global_allocator docs link to std::alloc::GlobalAlloc
commit sha 99483be1c7629a17fad45b9c208982c3891639e3
Auto merge of #6093 - ebroto:6089_renamed_lifetimes, r=Manishearth needless arbitrary self: handle macros This fixes two cases related to macros: * If the parameter comes from expansion, do not lint as the user has no possibility of changing it. This is not directly related to the fixed issue, but we should probably do that. * If *only* the lifetime name comes from expansion, lint, but allow the user decide the name of the lifetime. In the related issue, the lifetime was unnamed and then renamed by `async_trait`, so just removing the name in the suggestion would work, but in the general case a macro can rename a lifetime that was named differently, and we can't reliably know that name anymore. As a hint for the reviewer, the expanded code for the test can be checked with this command (from the root dir of the repo): ```sh rustc -L target/debug/test_build_base/needless_arbitrary_self_type_unfixable.stage-id.aux -Zunpretty=expanded tests/ui/needless_arbitrary_self_type_unfixable.rs ``` changelog: [`needless_arbitrary_self_type`]: handle macros Fixes #6089
commit sha 9ef68f53e1f882afb63f824a10ff33ccd2c4764b
resolve: improve "try using the enum's variant" This commit improves the "try using the enum's variant" suggestion: - Variants in suggestions would not result in more errors (e.g. use of a struct variant is only suggested if the suggestion can trivially construct that variant). Therefore, suggestions are only emitted for variants that have no fields (since the suggestion can't know what value fields would have). - Suggestions include the syntax for constructing the variant. If a struct or tuple variant is suggested, then it is constructed in the suggestion - unless in pattern-matching or when arguments are already provided. - A help message is added which mentions the variants which are no longer suggested. Signed-off-by: David Wood <[email protected]>
commit sha 094f14c554c3a1f103a5d6778d4b4e131c297f11
Add article after "to" Also added missing backtick in "you can cast" message.
push time in a day
pull request commentrust-lang/rust
Implement rustc side of report-future-incompat
@pnkfelix: I ended up going with a combination of our ideas. rustc only ever emits a JSON future-compat-report, but compiletest renders it a simple human-readable format.
Other changes:
- I renamed the flag from
-Z emit-future-compat-reportto-Z emit-future-incompat-reportfor consistency wit the RFC. - Compiletest passes
-Z emit-future-compat-reportto every UI test, and skips rendering if the JSON report message is empty. - I added a workaround for invoking
rustfixin compiletest - we now filter out all non-Diagnosticjson lines, since compiletest doesn't recognize the future-incompat-report message.
The test src/test/ui/iterators/into-iter-on-arrays-lint.rs shows the results of these changes.
comment created time in a day
push eventAaron1011/rust
commit sha 5f37f646822e30f31828319825f4a4f9a86ed60a
Don't display empty future-compat report
commit sha 6f0b239edbe4620cd998d2d4f02600f31324ad91
Always pass `-Z future-incompat-report` to UI tests
push time in a day
push eventAaron1011/rust
commit sha 48c874aa14723c789a76de57142aa5a0fc1e71dc
Update into-iter-on-arrays test to check future-incompat-report
push time in a day
push eventAaron1011/rust
commit sha 0ad3da06843089c0bf10d6caa3fbbc72fa67787a
Enable ASLR for windows-gnu
commit sha e023158145ece18176a2e93420600ccda0d0bc58
Permit uninhabited enums to cast into ints This essentially reverts part of #6204.
commit sha 990a39596cf3b33e550f2045f78a62970f8d78f8
Prevent ICE on uninhabited MIR interpretation
commit sha 390a13b06c79d4177b829097b06453e38188081f
needless-lifetime - fix nested elision site FPs
commit sha a60e5de90c7370d4fb3e6561d3cb55495cda2e2a
needless-lifetime / nested elision sites / PR remarks
commit sha c8e9e52303da6dff4bc5cc4db3021d608fca6c70
needless-lifetime / add test cases for nested elision sites
commit sha 1778a1ec4615a42a8ba9497006b07859186c08a1
Restrict `same_item_push` to suppress false positives It emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those.
commit sha 0117ea2b016133145f9e02e27421ac3672b42f57
Refactoring: use inner function
commit sha b80576fba633e1fc214c9f6900d7ca3424bda6d0
Some refactoring
commit sha 14faebe20ea82392f393c3ff5efaab7250e51989
Add some tests to `same_item_push` Add tests in which the variable is initialized with a match expression and function call
commit sha 2972ad3ef661071531a61ec8999b668a6b734b74
Refactoring: tests in `same_item_push`
commit sha 730ca457f580247667ed0cd5965bc08752ebc0b3
Address `items_after_statement`
commit sha a02014280586b53997622c501db00398376967a8
Refactor io/buffered.rs into submodules
commit sha 96229f02402e82914ec6100b28ad2cbdd273a0d4
move buffered.rs to mod.rs
commit sha 72b402ed38f0c71461038aef8a49a02e49280788
Add pass names to some common dataflow analyses
commit sha 6d75cdfc9ed9e6987bd23add6cf3954d2499dce2
Added updated compiler diagnostic
commit sha da700cba08a2b194d19e63d3c51ebadce96fe46b
Stabilize move_ref_pattern
commit sha afb9eeb1b9ea16ca65e38673a0ef3e7be81d7252
Disabled error `E0007` from rustc_error_codes
commit sha 05c9c0ee5dcd935f518db151bee2dc88380fb92f
Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general.
commit sha c4280af8285c61b367a87c8f6eef9876011a8150
Retry fix error reporting suggestions
push time in a day
pull request commentrust-lang/miri
@RalfJung: It prints disabled backtrace instead
comment created time in 2 days
Pull request review commentrust-lang/rust
Add Linux-specific pidfd process extensions
impl Command { } } + // Attempts to fork the process. If successful, returns+ // Ok((0, -1)) in the child, and Ok((child_pid, child_pidfd)) in the parent.+ fn do_fork(&mut self) -> Result<(libc::c_long, libc::pid_t), io::Error> {+ // Whatever happens after the fork is almost for sure going to touch or+ // look at thbe environment in one way or another (PATH in `execvp` or+ // accessing the `environ` pointer ourselves). Make sure no other thread+ // is accessing the environment when we do the fork itself.+ //+ // Note that as soon as we're done with the fork there's no need to hold+ // a lock any more because the parent won't do anything and the child is+ // in its own process.+ let _env_lock = unsafe { sys::os::env_lock() };++ // If we fail to create a pidfd for any reason, this will+ // stay as -1, which indicates an error+ let mut pidfd: libc::pid_t = -1;++ // On Linux, attempt to use the `clone3` syscall, which+ // supports more argument (in particular, the ability to create a pidfd).+ // If this fails, we will fall through this block to a call to `fork()`+ cfg_if::cfg_if! {+ if #[cfg(target_os = "linux")] {+ static HAS_CLONE3: AtomicBool = AtomicBool::new(true);++ const CLONE_PIDFD: u64 = 0x00001000;++ #[repr(C)]+ struct clone_args {+ flags: u64,+ pidfd: u64,+ child_tid: u64,+ parent_tid: u64,+ exit_signal: u64,+ stack: u64,+ stack_size: u64,+ tls: u64,+ set_tid: u64,+ set_tid_size: u64,+ cgroup: u64,+ }++ syscall! {+ fn clone3(cl_args: *mut clone_args, len: libc::size_t) -> libc::c_long+ }++ if HAS_CLONE3.load(Ordering::Relaxed) {+ let mut flags = 0;+ if self.make_pidfd {+ flags |= CLONE_PIDFD;
See the Some(libc::ENOSYS) => branch below
comment created time in 2 days
push eventAaron1011/miri
commit sha 67cf6c21761a778d45784bc1189bdba7618a6ff1
rustup; the bad compile times for the float test are fixed
commit sha 2f390c05e5049f1fb8cf4765525dee1b9f3f7e98
Auto merge of #1585 - RalfJung:rustup, r=RalfJung rustup; the bad compile times for the float test are fixed
commit sha 8b10dbfeaab5826fb3d179bb94454a80182a9c3a
Test std::backtrace::Backtrace Fixes #1578
push time in 3 days
pull request commentrust-lang/rust
Implement rustc side of report-future-incompat
@pnkfelix: I don't think having human-readable output emitted by rustc would be very useful. The actual messages displayed to the user will be emitted from Cargo by parsing the json output, which could cause any testing-only output to get out of sync.
I think it would be better to have compiletest perform some minimal parsing of the future-compat report, and add an new ~FUTURE-COMPAT comment that can be used in test files.
comment created time in 3 days
startedzotero/zotero
started time in 3 days
issue commentrust-lang/rust
SIGSEGV from rustc while building crate `legion`
@OvermindDL1: I'm running Arch Linux with an Intel Core i9-8950HK
comment created time in 4 days
issue commentrust-lang/rust
SIGSEGV from rustc while building crate `legion`
@OvermindDL1: I can't reproduce the crash at all with your repository.
Does this happen if you run rustc directly on the file? Could you record a trace with rr?
comment created time in 4 days
startedmicrosoft/BITS-Manager
started time in 4 days
pull request commentrust-lang/rust
Eliminate some temporary vectors
@bors try @rust-timer queue
comment created time in 5 days
PR opened rust-lang/rust
This pulls in https://github.com/rust-lang/backtrace-rs/pull/376, which
fixes Miri support for std::backtrace::Backtrace.
pr created time in 5 days
pull request commentrust-lang/rust
Compute proper module parent during resolution
@jyn514: It's not quite the same code - we don't have a tcx available in the resolver, so we need to go through the cstore methods directly. I think it's better to keep this separate, since going through a tcx is better when a tcx is available.
comment created time in 5 days
PR opened rust-lang/rust
Fixes #75982
The direct parent of a module may not be a module
(e.g. const _: () = { #[path = "foo.rs"] mod foo; };).
To find the parent of a module for purposes of resolution, we need to walk up the tree until we hit a module or a crate root.
pr created time in 5 days
startedgimli-rs/unwind-rs
started time in 5 days
issue commentrust-lang/rust
ICE: Expected module, found DefId
Minimized:
// src/lib.rs
const _: () = {
#[path = "foo.rs"]
mod foo;
};
// src/foo.rs
#[macro_export]
macro_rules! my_macro {
() => {}
}
// src/main.rs
fn main() {
weird_path::my_macro!();
}
comment created time in 5 days
pull request commentrust-lang/backtrace-rs
@alexcrichton: This should be ready to merge
comment created time in 5 days
push eventAaron1011/backtrace-rs
commit sha 588ae82608e05c8687cb9a69dc9016c152235f91
Test Miri on CI
push time in 5 days
push eventAaron1011/backtrace-rs
commit sha 662d4875a5f6c0838832e99209ee28057cbaa235
Test Miri on CI
push time in 5 days
issue commentrust-lang/rust
SIGSEGV from rustc while building crate `legion`
@ehuss: What commit of legion did you build?
comment created time in 5 days
issue commentrust-lang/rust
proc-macro receives warnings only when used within `macro_rules!` macros
Unfortunately, I don't think there's too much that can be done on the rustc side. Proc-macros can concatenate tokens with completely incompatible spans (e.g. different locations in the file, or even different files entirely), and the parser has to make some decision about how to join them. When the hygiene differs (as in this example), it gets even tricker.
I think the best solution would be to perform any semantic checks (e.g. whether a span comes from an external macro) on a span of a single identifier, whenever possible. In this case, we should be checking the span of the item's identifier, rather than the span of the entire item.
This should result in the correct behavior for most proc-macros - if the item name is generated by the proc-macro, it's unlikely that we'll want to lint on it.
comment created time in 5 days
issue commentrust-lang/rust
proc-macro receives warnings only when used within `macro_rules!` macros
Here's what seems to be happening:
- The
missing_debug_implementationslint uses the span of the entire item (see this example. - The item synthesized by the attribute macro uses a combination of
Spans- thevisspan is located at the visibility in the original item, while the name is located at the call site (the entire attribute invocation). These spans can't be meaningfully joined together, so the parser ends up truncating the span to just use the span ofvis. - When we emit a lint, we check if the span occurs in an external macro: https://github.com/rust-lang/rust/blob/7f587168102498a488abf608a86c7fdfa62fb7bb/compiler/rustc_middle/src/lint.rs#L245-L260
Since our span has been truncated to just include vis, our span comes directly from the macro_rules! invocation - we have no idea that a proc macro was involved. Therefore, we treat this span as not coming from an external macro, and emit the lint.
comment created time in 5 days
pull request commenttaiki-e/pin-project
Fix warnings when #[pin_project] used within macro_rules! macros
Actually, it looks like the warning is actually being emitted for the generated projection struct (__B<'pin>) both with and without the wrapping macro_rules!. Due to the span at pin-project uses, the lint appears to be for the main struct.
However, it looks like the lint normally get suppresed here: https://github.com/rust-lang/rust/blob/7f587168102498a488abf608a86c7fdfa62fb7bb/compiler/rustc_middle/src/lint.rs#L245-L260, due to it being emitted from the external pin-project macro.
comment created time in 5 days
pull request commenttaiki-e/pin-project
Fix warnings when #[pin_project] used within macro_rules! macros
The missing_debug_implementations warning seems like a rustc bug.
comment created time in 5 days
startedmattdiamond/fuckitjs
started time in 5 days
pull request commentrust-lang/backtrace-rs
@RalfJung What's the preferred way to handle this kind of thing? Is there a way to get Rustup to automatically install the most recent nightly that has Miri available?
comment created time in 6 days
pull request commentrust-lang/rust
Rewrite `collect_tokens` implementations to use a flattened buffer
@petrochenkov: I've squashed the commits into one to remove the intermediate work.
comment created time in 6 days
push eventAaron1011/rust
commit sha 66ae94c448cce7e858ef24d15efbbb6a373772ee
Rewrite `collect_tokens` implementations to use a flattened buffer Instead of trying to collect tokens at each depth, we 'flatten' the stream as we go allowing, pushing open/close delimiters to our buffer just like regular tokens. One capturing is complete, we reconstruct a nested `TokenTree::Delimited` structure, producing a normal `TokenStream`. By itself, this should be equivalent to the previous implementation. However, this makes it easy to modify the captured stream at an arbitrary depth, simply by replacing tokens in the flattened buffer. This is important for PR #76130, which requires us to track information about attributes along with tokens.
push time in 6 days
push eventAaron1011/rust
commit sha 0ad3da06843089c0bf10d6caa3fbbc72fa67787a
Enable ASLR for windows-gnu
commit sha cfe07cd42a92610219d6ffc1ae5eefef42f5254a
Use llvm::computeLTOCacheKey to determine post-ThinLTO CGU reuse During incremental ThinLTO compilation, we attempt to re-use the optimized (post-ThinLTO) bitcode file for a module if it is 'safe' to do so. Up until now, 'safe' has meant that the set of modules that our current modules imports from/exports to is unchanged from the previous compilation session. See PR #67020 and PR #71131 for more details. However, this turns out be insufficient to guarantee that it's safe to reuse the post-LTO module (i.e. that optimizing the pre-LTO module would produce the same result). When LLVM optimizes a module during ThinLTO, it may look at other information from the 'module index', such as whether a (non-imported!) global variable is used. If this information changes between compilation runs, we may end up re-using an optimized module that (for example) had dead-code elimination run on a function that is now used by another module. Fortunately, LLVM implements its own ThinLTO module cache, which is used when ThinLTO is performed by a linker plugin (e.g. when clang is used to compile a C proect). Using this cache directly would require extensive refactoring of our code - but fortunately for us, LLVM provides a function that does exactly what we need. The function `llvm::computeLTOCacheKey` is used to compute a SHA-1 hash from all data that might influence the result of ThinLTO on a module. In addition to the module imports/exports that we manually track, it also hashes information about global variables (e.g. their liveness) which might be used during optimization. By using this function, we shouldn't have to worry about new LLVM passes breaking our module re-use behavior. In LLVM, the output of this function forms part of the filename used to store the post-ThinLTO module. To keep our current filename structure intact, this PR just writes out the mapping 'CGU name -> Hash' to a file. To determine if a post-LTO module should be reused, we compare hashes from the previous session. This should unblock PR #75199 - by sheer chance, it seems to have hit this issue due to the particular CGU partitioning and optimization decisions that end up getting made.
commit sha 0a4dc8bc161c68320a60a6bde525adae258b6252
Adds a GitHub Actions CI build for aarch64-pc-windows-msvc via cross-compilation on an x86_64 host. This promotes aarch64-pc-windows-msvc from a Tier 2 Compilation Target (std) to a Tier 2 Development Platform (std+rustc+cargo+tools). Fixes #72881
commit sha 225ec813a9b25cdf94811d5b6c5207848cfef829
Add a cross-compiling aarch64-apple-darwin CI builder
commit sha 2fe271e4c2b5f89108314177348d7732f533582f
Move aarch64-apple-darwin to tier 2 Drive-by fixes to update the naming of "OSX" [sic] to "macOS".
commit sha 536674fb69ea161f50f68f3fdb65950feffd92a4
cleanup WithOptConstParam queries
commit sha a35a93f09cc111a53d00efc567ad678583dd5ac7
Pass tune-cpu to LLVM I think this is how it should work...
commit sha 8160bfa39caad79a224ec44449efe48dd0c79c36
query_name_of_opt_const_arg -> query_name_opt_const_arg
commit sha 97beb074aff40cb1b6444e9eff734a1a5c17dfc7
BTreeMap: derive type-specific variants of node_as_mut and cast_unchecked
commit sha ce45b4f3bab24fbd7e5b5e7abbb027602f33cacc
Remove unused class rule
commit sha e55d27fbcefffbddb85f28cf4eb913674f2188c6
Remove unnecessary rustc_const_stable attributes.
commit sha c25f69a1e3993bba59853767b366068685f64766
Remove unsafety from unsupported/mutex.rs by using a Cell. Replacing the UnsafeCell by a Cell simplifies things and makes it all safe.
commit sha 3d192ace34bcb13d3c033735cd7415260040c252
Remove unsafety from unsupported/rwlosck.rs by using a Cell. Replacing the UnsafeCell by a Cell makes it all safe.
commit sha 8d2c622d48fc3e39c466e67608450ce078f900ea
Implement `AsRawFd` for `StdinLock` etc. on WASI. WASI implements `AsRawFd` for `Stdin`, `Stdout`, and `Stderr`, so implement it for `StdinLock`, `StdoutLock`, and `StderrLock` as well.
commit sha f4e884288d0a1d6210e15bc7f8b014ef4cf86c32
Apply deny(unsafe_op_in_unsafe_fn) to all of sys/unsupported.
commit sha f1c3edbfaba6dd1723fcd63857f7de5ef2278f57
Assert state in sys/unsupported's RwLock::write_unlock. Co-authored-by: Joshua Nelson <[email protected]>
commit sha 07627a3aa3dc7e0e961b523808dfd55bb86bde3e
Add a regression test for issue-52843
commit sha 32bc245bc09c724699cb1fed63c2ea17a20532c4
Add a regression test for issue-53448
commit sha ebc1f89ecf3a8de6da0ed6c5809586105f5d7fae
Add a regression test for issue-54108
commit sha 3a4fe97052cf9d3f244fcab885e338a6384cefa6
Add a regression test for issue-65581
push time in 6 days
issue commentdtolnay/async-trait
unused_parens warning generated
Now that https://github.com/rust-lang/rust/issues/75734 has been fixed, the lint should no longer fire.
comment created time in 6 days
issue commentrust-lang/rust
Remove `NtIdent` hack for regressed crates
I don't know why I thought that my PR fixed this issue...
comment created time in 6 days
pull request commentrust-lang/rust
Try to make ObligationForest more efficient
@bors try
comment created time in 7 days
issue commentrust-lang/rust
Type inference regression and ICE in nightly 2020-10-06
Can this issue be closed?
comment created time in 7 days
Pull request review commentrust-lang/rust
WIP: Change built-in kernel targets to be os = none throughout
pub fn target() -> Target { base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); Target {- // FIXME: Some dispute, the linux-on-clang folks think this should use "Linux"- llvm_target: "x86_64-elf".to_string(),+ // FIXME: Some dispute, the linux-on-clang folks think this should use+ // "Linux" We disagree because running *on* linux is nothing like+ // running *as" linux, and historically the "os" component as has always+ // been used to mean the "as" part.
shouldn't this be 'the "on" part'?
comment created time in 7 days
pull request commentrust-lang/rust
Refactor AST pretty-printing to allow skipping insertion of extra parens
@bors rollup=never
This will cause a (small) amount of breakage, so let's make it easy to bisect.
comment created time in 7 days
pull request commentrust-lang/rust
Refactor AST pretty-printing to allow skipping insertion of extra parens
There are a few actix-web regressions that were missed by the check, due to a weird directory structure or being in anotger fork (e.g. karyx).
@petrochenkov I could extend the check, but it looks like we've covered nearly all of the regressions. This should should be ready to merge.
comment created time in 7 days
push eventAaron1011/rust
commit sha c16c8acae13e1a3b29b222fdb0be11244dc65937
Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component Fixes #55890 It's useful to have `llc` and `opt` available when debugging an LLVM miscompilation,.
push time in 8 days
pull request commentrust-lang/rust
Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component
@Mark-Simulacrum I added llvm-dis
comment created time in 8 days
push eventAaron1011/rust
commit sha 0920dd3e207c27301e545d7c9829ed8802991fd7
Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component Fixes #55890 It's useful to have `llc` and `opt` available when debugging an LLVM miscompilation,.
push time in 8 days
PR opened rust-lang/rust
Fixes #55890
It's useful to have llc and opt available when debugging an LLVM
miscompilation,.
pr created time in 8 days
issue commentrust-lang/rust
Incorrect code behavior on aarch64
@berkus: It looks like you're not declaring some registers as being clobbered:
https://github.com/metta-systems/vesper/blob/bd267e44abd72712bf88cc6d489cf2a2939ad4cf/nucleus/src/qemu.rs#L5-L13
You're writing to the w0 and x1 registers, but you're only declaring a memory clobber. LLVM doesn't try to parse your ASM snippet to determine clobbers, so LLVM may decide to store other things in w0 or x1 without saving them.
Changing the clobbers line to "memory", "w0", "x1" fixed the miscompilation for me.
comment created time in 8 days
startedoliver-giersch/closure
started time in 8 days
issue commentrust-lang/rust
repr(packed) allows invalid unaligned loads
https://github.com/rust-lang/rust/pull/75534 should help make progress on getting crates to update their code.
comment created time in 8 days
pull request commentrust-lang/rust
Erase all regions before constructing an LLVM type
@eddyb: Are there any changes that you'd like me to make?
comment created time in 8 days
startedmicrosoft/com-rs
started time in 8 days
pull request commentrust-lang/rust
Re-enable debug and LLVM assertions
https://github.com/rust-lang/rust/pull/76859 has been merged, so this is now unblocked.
comment created time in 9 days
pull request commentrust-lang/backtrace-rs
@alexcrichton: How do you want to handle the case where Miri is not available for a given channel?
comment created time in 9 days
PR opened rust-lang/backtrace-rs
This PR gets all of the tests passing under Miri, and runs them on CI.
pr created time in 9 days
pull request commentrust-lang/rust
I bumped Miri again so that it includes https://github.com/rust-lang/miri/pull/1580
@bors r=RalfJung
comment created time in 9 days
push eventAaron1011/rust
commit sha 5e34bddc1b066fd70c8244c3312c08680f68091f
Bump miri
push time in 9 days
Pull request review commentrust-lang/rust
Remove compiler-synthesized reexports when documenting
impl Clean<Vec<Item>> for doctree::ExternCrate<'_> { impl Clean<Vec<Item>> for doctree::Import<'_> { fn clean(&self, cx: &DocContext<'_>) -> Vec<Item> {+ // We need this comparison because some imports (for std types for example)+ // are "inserted" as well but directly by the compiler and they should not be+ // taken into account.+ if self.span.is_dummy() {
Fixing these issues is tracked by https://github.com/rust-lang/rust/issues/43081.
Once that issue is resolved, I don't think proc-macros should be emitting dummy spans (unless we add a way to synthesize them). The one exception might be built-in macros - some of the code in compiler/rustc_builtin_macros emits DUMMY_SP, but I don't think this is observable by proc-macros.
That being said, I think we can use a more specifi check than is_dummy. From reading the linked discussion, I think this is intended to handle the prelude imports. If so, you can check for ExpnKind::AstPass(AstPass::StdImports) on the span's outer SyntaxContext.
comment created time in 9 days
startedwsmoses/Enzyme
started time in 9 days
Pull request review commentrust-lang/miri
README: make our cross-interpretation feature stand out more
error: unsupported operation: can't call foreign function: bind performed an operation that the interpreter does not support ``` +### Cross-interpretation: running for different targets++Miri cannot just run a binary or test suite for your host target, it can also
Saying 'cannot just' sounds like 'this requires extra steps' (e.g. 'You cannot just use 'cargo build' to compile miri, you must use './miri build').
comment created time in 9 days
push eventAaron1011/miri
commit sha c889eba4b27e9b365a8824969aa3deb0525fa0c0
Add comment about deprecation
push time in 9 days
push eventAaron1011/miri
commit sha 0893ea1973b479198722556ec2115af21e3b097c
Rustup This gets Miri building again after the `run_compiler` changes
push time in 9 days
PR opened rust-lang/miri
This gets Miri building again after the run_compiler changes
pr created time in 9 days
issue commentrust-lang/rust
`miri` no longer builds after rust-lang/rust#77731
The build failure still needs to be fixed.
comment created time in 9 days
Pull request review commentrust-lang/rust
Rewrite `collect_tokens` implementations to use a flattened buffer
impl<'a> Parser<'a> { assert!(suffix.is_none()); let symbol = Symbol::intern(&i); self.token = Token::new(token::Ident(symbol, false), ident_span);- let next_token = Token::new(token::Dot, dot_span);+ // This `.` is part of a floating point literal, so it cannot+ // be glued to anything else (e.g. to form a `..`)+ let next_token = (Token::new(token::Dot, dot_span), Spacing::Alone);
@petrochenkov: Can you check if this (and other uses of Spacing::Alone for synthesized tokens) are correct? I don't full understand how Spacing works.
comment created time in 9 days
push eventAaron1011/rust
commit sha b4b383981abac7ca8aa180c7ae3e28876615b887
Add PartialEq impls for Vec <-> slice
commit sha a009e2838b25df2761093d727d322a59f69d8f68
There isn't a way to pass --remove yet, but you can rm if u like
commit sha 492826ac144666c75d68bc0a0121453ecc08561f
Add a note about the panic behavior of math operations on time objects
commit sha 390a13b06c79d4177b829097b06453e38188081f
needless-lifetime - fix nested elision site FPs
commit sha a60e5de90c7370d4fb3e6561d3cb55495cda2e2a
needless-lifetime / nested elision sites / PR remarks
commit sha c8e9e52303da6dff4bc5cc4db3021d608fca6c70
needless-lifetime / add test cases for nested elision sites
commit sha 1778a1ec4615a42a8ba9497006b07859186c08a1
Restrict `same_item_push` to suppress false positives It emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those.
commit sha 0117ea2b016133145f9e02e27421ac3672b42f57
Refactoring: use inner function
commit sha b80576fba633e1fc214c9f6900d7ca3424bda6d0
Some refactoring
commit sha 14faebe20ea82392f393c3ff5efaab7250e51989
Add some tests to `same_item_push` Add tests in which the variable is initialized with a match expression and function call
commit sha 2972ad3ef661071531a61ec8999b668a6b734b74
Refactoring: tests in `same_item_push`
commit sha 730ca457f580247667ed0cd5965bc08752ebc0b3
Address `items_after_statement`
commit sha 72b402ed38f0c71461038aef8a49a02e49280788
Add pass names to some common dataflow analyses
commit sha dc655b28424549a4775bc2e8c9021d44482bccb1
Prevent stackoverflow
commit sha a6ff925f8b5598a1f6d84964525baa1d4a08fd63
Reduce boilerplate with the matches! macro Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro.
commit sha 5e393c7747d081c45414060f81016e9ea3cb961f
Fix a FP in `explicit_counter_loop` Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented, adjust the test so that counters are incremented at the end of the loop and add the test for this false positive.
commit sha 3e294b22a43be349262405715cf4885296c284ba
Revert "or_fn_call: ignore nullary associated const fns" This reverts commit 7a66e6502dc3c7085b3f4078c01d4957d96175ed.
commit sha ce83d8d4d1b28e73888a616d3ffbf19c6a620588
Revert "Avoid or_fun_call for const_fn with no args" This reverts commit 5d66bd7bb3fd701d70ec11217e3f89fabe5cb0a7.
commit sha 9365660a2fc57210996df733efe468019c671b2f
unnecessary sort by: avoid dereferencing closure param
commit sha d1f9cad102b5686f2b827f3c62a02dfe419128a6
Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup
push time in 9 days
pull request commentrust-lang/rust
Refactor AST pretty-printing to allow skipping insertion of extra parens
@craterbot check crates=https://crater-reports.s3.amazonaws.com/pr-77135/retry-regressed-list.txt p=1
comment created time in 9 days
pull request commentrust-lang/rust
Refactor AST pretty-printing to allow skipping insertion of extra parens
Actually, this particular case isn't directly caused by actix-web or pin-project - the root cause is an outdated version of syn. actix-web just happens to expose the issue because it invokes pin-project with an NtIdent , causing the older version of syn to choke on the None-delimited group.
I think we just need to get people on the latest version of syn - doing so should help with other backwards-compat hacks as well.
comment created time in 9 days
PR opened rust-lang/rust
Fixes #77791
r? @RalfJung
cc @alexcrichton
pr created time in 9 days
pull request commentrust-lang/backtrace-rs
Fix miri imports for inclusion in libstd
@alexcrichton: Do we need to make a new release before bumping the submodule in rustc?
comment created time in 9 days
push eventAaron1011/miri
commit sha 6a6767fa2aa87567ec7dfa82f3cecaf773b0b1d0
Apply suggestions from code review Co-authored-by: Ralf Jung <[email protected]>
push time in 9 days
pull request commentrust-lang/miri
Add an `fn_ptr` field to `MiriFrame`
@RalfJung: Would you like me to add any kind of deprecation warning for the 4-field case, or should we just remove it later without a warning?
comment created time in 9 days