Skip to content

Commit

Permalink
prepare for PR (tidy should pass, caching=yes by default for rustc-perf)
Browse files Browse the repository at this point in the history
  • Loading branch information
futile committed Aug 14, 2024
1 parent eef8e23 commit d47fa70
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/tokenstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl fmt::Debug for LazyAttrTokenStream {

impl<S: SpanEncoder> Encodable<S> for LazyAttrTokenStream {
fn encode(&self, _s: &mut S) {
// TODO(pr-time): Just a reminder that this exists/was tried out,
// FIXME(pr-time): Just a reminder that this exists/was tried out,
// but probably not necessary anymore (see below).
// self.to_attr_token_stream().encode(s)
// We should not need to anymore, now that we `flatten`?
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_expand/src/derive_macro_expansion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub(super) fn provide_derive_macro_expansion<'tcx>(
let strategy = crate::proc_macro::exec_strategy(ecx);
let server = crate::proc_macro_server::Rustc::new(ecx);
let res = match client.run(&strategy, server, input.clone(), proc_macro_backtrace) {
// TODO(pr-time): without flattened some (weird) tests fail, but no idea if it's correct/enough
// FIXME(pr-time): without flattened some (weird) tests fail, but no idea if it's correct/enough
Ok(stream) => Ok(tcx.arena.alloc(stream.flattened()) as &TokenStream),
Err(e) => {
ecx.dcx().emit_err({
Expand Down Expand Up @@ -102,11 +102,11 @@ where
} else {
// We could get an `CONTEXT` pointer from another thread.
// Ensure that `CONTEXT` is `DynSync`.
// TODO(pr-time): we should not be able to?
// FIXME(pr-time): we should not be able to?
// sync::assert_dyn_sync::<CONTEXT<'_>>();

// prevent double entering, as that would allow creating two `&mut ExtCtxt`s
// TODO(pr-time): probably use a RefCell instead (which checks this properly)?
// FIXME(pr-time): probably use a RefCell instead (which checks this properly)?
enter_context_erased((ptr::null_mut(), None), || unsafe {
let ectx = downcast(ectx);
f(Some(&mut (ectx, client_opt.unwrap())))
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_expand/src/proc_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ impl MultiItemModifier for DeriveProcMacro {
crate::base::ann_pretty_printing_compatibility_hack(&item, &ecx.sess);
let input = item.to_tokens();
let res = ty::tls::with(|tcx| {
// TODO(pr-time): without flattened some (weird) tests fail, but no idea if it's correct/enough
// FIXME(pr-time): without flattened some (weird) tests fail, but no idea if it's correct/enough
let input = tcx.arena.alloc(input.flattened()) as &TokenStream;
let invoc_id = ecx.current_expansion.id;

// TODO(pr-time): Just using the crate hash to notice when the proc-macro code has
// FIXME(pr-time): Just using the crate hash to notice when the proc-macro code has
// changed. How to *correctly* depend on exactly the macro definition?
// I.e., depending on the crate hash is just a HACK (and leaves garbage in the
// incremental compilation dir).
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_query_impl/src/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ macro_rules! define_queries {
// don't `unwrap()` here, just manually check for `None` and do best-effort error
// reporting.
if res.is_none() {
// TODO(pr-time): something else than just `eprintln!`?
// FIXME(pr-time): something else than just `eprintln!`?
eprintln!("Failed to collect active jobs for query with name `{}`!", stringify!($name));
}
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1637,8 +1637,8 @@ options! {
"emit noalias metadata for box (default: yes)"),
branch_protection: Option<BranchProtection> = (None, parse_branch_protection, [TRACKED],
"set options for branch target identification and pointer authentication on AArch64"),
cache_all_derive_macros: bool = (false, parse_bool, [UNTRACKED],
"cache the results of ALL derive macro invocations (potentially unsound!) (default: no)"),
cache_all_derive_macros: bool = (true, parse_bool, [UNTRACKED],
"cache the results of ALL derive macro invocations (potentially unsound!) (default: YES -- for rustc-perf)"),
cf_protection: CFProtection = (CFProtection::None, parse_cfprotection, [TRACKED],
"instrument control-flow architecture protection"),
check_cfg_all_expected: bool = (false, parse_bool, [UNTRACKED],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// The proc-macro (for `Nothing`) prints a message to stderr when invoked,
// and this message should only be present during the second invocation
// (which has `cfail2` set via cfg).
// TODO(pr-time): Properly have the test check this, but how? UI-test that tests for `.stderr`?
// FIXME(pr-time): Properly have the test check this, but how? UI-test that tests for `.stderr`?

//@ aux-build:derive_nothing.rs
//@ revisions:cfail1 cfail2
Expand Down

0 comments on commit d47fa70

Please sign in to comment.