Skip to content

Commit 5c8459f

Browse files
committed
Auto merge of rust-lang#126691 - fee1-dead-contrib:rollup-v4vtowh, r=fee1-dead
Rollup of 5 pull requests Successful merges: - rust-lang#126668 (Remove now NOP attrs `#[rustc_dump{,_env}_program_clauses]`) - rust-lang#126674 (Allow tracing through item_bounds query invocations on opaques) - rust-lang#126675 (Change a `DefineOpaqueTypes::No` to `Yes` in diagnostics code) - rust-lang#126681 (Rework doc-test attribute documentation example) - rust-lang#126684 (Migrate `run-make/glibc-staticlib-args` to `rmake.rs`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 894f7a4 + 9e8a7a8 commit 5c8459f

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

Diff for: compiler/rustc_feature/src/builtin_attrs.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1088,14 +1088,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
10881088
ErrorFollowing, EncodeCrossCrate::No,
10891089
"the `#[custom_mir]` attribute is just used for the Rust test suite",
10901090
),
1091-
rustc_attr!(
1092-
TEST, rustc_dump_program_clauses, Normal, template!(Word),
1093-
WarnFollowing, EncodeCrossCrate::No
1094-
),
1095-
rustc_attr!(
1096-
TEST, rustc_dump_env_program_clauses, Normal, template!(Word),
1097-
WarnFollowing, EncodeCrossCrate::No
1098-
),
10991091
rustc_attr!(
11001092
TEST, rustc_object_lifetime_default, Normal, template!(Word),
11011093
WarnFollowing, EncodeCrossCrate::No

Diff for: compiler/rustc_hir_analysis/src/collect/item_bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn associated_type_bounds<'tcx>(
5959
/// impl trait it isn't possible to write a suitable predicate on the
6060
/// containing function and for type-alias impl trait we don't have a backwards
6161
/// compatibility issue.
62-
#[instrument(level = "trace", skip(tcx), ret)]
62+
#[instrument(level = "trace", skip(tcx, item_ty))]
6363
fn opaque_type_bounds<'tcx>(
6464
tcx: TyCtxt<'tcx>,
6565
opaque_def_id: LocalDefId,

Diff for: compiler/rustc_hir_typeck/src/method/probe.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,8 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
13571357
traits::SelectionContext::new(self).select(&obligation)
13581358
}
13591359

1360+
/// Used for ambiguous method call error reporting. Uses probing that throws away the result internally,
1361+
/// so do not use to make a decision that may lead to a successful compilation.
13601362
fn candidate_source(&self, candidate: &Candidate<'tcx>, self_ty: Ty<'tcx>) -> CandidateSource {
13611363
match candidate.kind {
13621364
InherentImplCandidate(_) => {
@@ -1370,8 +1372,10 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
13701372
self.instantiate_binder_with_fresh_vars(self.span, infer::FnCall, trait_ref);
13711373
let (xform_self_ty, _) =
13721374
self.xform_self_ty(candidate.item, trait_ref.self_ty(), trait_ref.args);
1375+
// Guide the trait selection to show impls that have methods whose type matches
1376+
// up with the `self` parameter of the method.
13731377
let _ = self.at(&ObligationCause::dummy(), self.param_env).sup(
1374-
DefineOpaqueTypes::No,
1378+
DefineOpaqueTypes::Yes,
13751379
xform_self_ty,
13761380
self_ty,
13771381
);

Diff for: compiler/rustc_query_impl/src/plumbing.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ macro_rules! define_queries {
620620
tcx,
621621
{
622622
let ret = call_provider!([$($modifiers)*][tcx, $name, key]);
623-
tracing::trace!(?ret);
623+
rustc_middle::ty::print::with_reduced_queries!({
624+
tracing::trace!(?ret);
625+
});
624626
ret
625627
}
626628
)

Diff for: compiler/rustc_span/src/symbol.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1592,8 +1592,6 @@ symbols! {
15921592
rustc_do_not_const_check,
15931593
rustc_doc_primitive,
15941594
rustc_dummy,
1595-
rustc_dump_env_program_clauses,
1596-
rustc_dump_program_clauses,
15971595
rustc_dump_user_args,
15981596
rustc_dump_vtable,
15991597
rustc_effective_visibility,

Diff for: src/doc/rustdoc/src/write-documentation/the-doc-attribute.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ it will not.
144144
### `test(attr(...))`
145145

146146
This form of the `doc` attribute allows you to add arbitrary attributes to all your doctests. For
147-
example, if you want your doctests to fail if they produce any warnings, you could add this:
147+
example, if you want your doctests to fail if they have dead code, you could add this:
148148

149149
```rust,no_run
150-
#![doc(test(attr(deny(warnings))))]
150+
#![doc(test(attr(deny(dead_code))))]
151151
```
152152

153153
## At the item level

Diff for: src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ run-make/forced-unwind-terminate-pof/Makefile
5757
run-make/foreign-double-unwind/Makefile
5858
run-make/foreign-exceptions/Makefile
5959
run-make/foreign-rust-exceptions/Makefile
60-
run-make/glibc-staticlib-args/Makefile
6160
run-make/include_bytes_deps/Makefile
6261
run-make/incr-add-rust-src-component/Makefile
6362
run-make/incr-foreign-head-span/Makefile

Diff for: tests/run-make/glibc-staticlib-args/Makefile

-13
This file was deleted.

Diff for: tests/run-make/glibc-staticlib-args/rmake.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This ensures that std::env::args works in a library called from C on glibc Linux.
2+
3+
//@ only-gnu
4+
//@ only-linux
5+
//@ ignore-cross-compile
6+
7+
use run_make_support::{bin_name, cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib_name};
8+
9+
fn main() {
10+
rustc().input("library.rs").crate_type("staticlib").run();
11+
cc().input("program.c")
12+
.arg(static_lib_name("library"))
13+
.out_exe("program")
14+
.args(&extra_c_flags())
15+
.args(&extra_cxx_flags())
16+
.run();
17+
run(&bin_name("program"));
18+
}

0 commit comments

Comments
 (0)