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 9 pull requests #129632

Merged
merged 34 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7643ea5
create a new section on pointer to reference conversion
lolbinarycat Jul 24, 2024
1073f97
remove duplicate explanations of the ptr to ref conversion rules
lolbinarycat Jul 24, 2024
3877a7b
clarify interactions with MaybeUninit and UnsafeCell
lolbinarycat Jul 25, 2024
1944894
Add `warn(unreachable_pub)` to several crates.
nnethercote Jun 11, 2024
f839309
Add `warn(unreachable_pub)` to `rustc_arena`.
nnethercote Jun 11, 2024
ea014b4
Add `warn(unreachable_pub)` to `rustc_ast_lowering`.
nnethercote Jun 11, 2024
a6b2880
Add `warn(unreachable_pub)` to `rustc_ast_passes`.
nnethercote Jul 6, 2024
f2fc87d
Add `warn(unreachable_pub)` to `rustc_ast_pretty`.
nnethercote Jul 6, 2024
6614165
Add `warn(unreachable_pub)` to `rustc_attr`.
nnethercote Jul 6, 2024
cb3f435
Don't add `warn(unreachable_pub)` to `rustc_baked_icu`.
nnethercote Jul 6, 2024
0685c97
Add `warn(unreachable_pub)` to `rustc_borrowck`.
nnethercote Jul 6, 2024
0544d3a
Add `warn(unreachable_pub)` to `rustc_builtin_macros`.
nnethercote Jul 6, 2024
6162743
Add `warn(unreachable_pub)` to `rustc_codegen_llvm`.
nnethercote Jul 6, 2024
cc84442
Add `warn(unreachable_pub)` to `rustc_codegen_ssa`.
nnethercote Jul 6, 2024
e91f328
Deduplicate Spans in Uninitialized Check
stephen-lazaro Aug 21, 2024
988bc1c
fix typos in new pointer conversion docs
lolbinarycat Aug 22, 2024
2540070
document & impl the transmutation modeled by `BikeshedIntrinsicFrom`
jswrenn Aug 12, 2024
b581fed
Generate missing source link on impl associated types
GuillaumeGomez Aug 25, 2024
ca6be74
Add regression test for impl associated types source link
GuillaumeGomez Aug 25, 2024
00c435d
Do not ICE on non-ADT rcvr type when looking for crate version collision
estebank Aug 18, 2024
4a088d9
Remove crashes from type_of on resolution that doesn't have a type_of
compiler-errors Aug 26, 2024
b11e0a8
Apply suggestions from code review
cuviper Aug 26, 2024
4e15554
Remove a couple of unused feature enables
bjorn3 Aug 26, 2024
b4d3fa4
Remove ParamMode::ExplicitNamed
compiler-errors Aug 26, 2024
2db1d2e
Rename ParenthesizedGenericArgs to GenericArgsMode
compiler-errors Aug 26, 2024
110c3df
Rollup merge of #126013 - nnethercote:unreachable_pub, r=Urgau
matthiaskrgr Aug 26, 2024
c6ceb5b
Rollup merge of #128157 - lolbinarycat:unify-ptr-ref-docs, r=cuviper
matthiaskrgr Aug 26, 2024
29923b6
Rollup merge of #129032 - jswrenn:transmute-method, r=compiler-errors
matthiaskrgr Aug 26, 2024
d4d4b6b
Rollup merge of #129250 - estebank:issue-129205, r=compiler-errors
matthiaskrgr Aug 26, 2024
53f5294
Rollup merge of #129340 - stephen-lazaro:u/slazaro/issue-129274, r=co…
matthiaskrgr Aug 26, 2024
862b911
Rollup merge of #129560 - GuillaumeGomez:impl-assoc-type-source-link,…
matthiaskrgr Aug 26, 2024
90a1b6d
Rollup merge of #129622 - bjorn3:less_unstable, r=lqd
matthiaskrgr Aug 26, 2024
3d8d9da
Rollup merge of #129625 - compiler-errors:generic-args-mode, r=fmease
matthiaskrgr Aug 26, 2024
b3b6baf
Rollup merge of #129626 - compiler-errors:explicit-named, r=fmease
matthiaskrgr Aug 26, 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
1 change: 1 addition & 0 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![cfg_attr(feature = "nightly", doc(rust_logo))]
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
#![cfg_attr(feature = "nightly", feature(step_trait))]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

use std::fmt;
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![feature(strict_provenance)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

use std::alloc::Layout;
Expand Down
22 changes: 11 additions & 11 deletions compiler/rustc_arena/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl<T> TypedArena<T> {
}

#[test]
pub fn test_unused() {
fn test_unused() {
let arena: TypedArena<Point> = TypedArena::default();
assert!(arena.chunks.borrow().is_empty());
}
Expand Down Expand Up @@ -75,7 +75,7 @@ fn test_arena_alloc_nested() {
}

#[test]
pub fn test_copy() {
fn test_copy() {
let arena = TypedArena::default();
#[cfg(not(miri))]
const N: usize = 100000;
Expand All @@ -87,13 +87,13 @@ pub fn test_copy() {
}

#[bench]
pub fn bench_copy(b: &mut Bencher) {
fn bench_copy(b: &mut Bencher) {
let arena = TypedArena::default();
b.iter(|| arena.alloc(Point { x: 1, y: 2, z: 3 }))
}

#[bench]
pub fn bench_copy_nonarena(b: &mut Bencher) {
fn bench_copy_nonarena(b: &mut Bencher) {
b.iter(|| {
let _: Box<_> = Box::new(Point { x: 1, y: 2, z: 3 });
})
Expand All @@ -106,7 +106,7 @@ struct Noncopy {
}

#[test]
pub fn test_noncopy() {
fn test_noncopy() {
let arena = TypedArena::default();
#[cfg(not(miri))]
const N: usize = 100000;
Expand All @@ -118,7 +118,7 @@ pub fn test_noncopy() {
}

#[test]
pub fn test_typed_arena_zero_sized() {
fn test_typed_arena_zero_sized() {
let arena = TypedArena::default();
#[cfg(not(miri))]
const N: usize = 100000;
Expand All @@ -130,7 +130,7 @@ pub fn test_typed_arena_zero_sized() {
}

#[test]
pub fn test_typed_arena_clear() {
fn test_typed_arena_clear() {
let mut arena = TypedArena::default();
for _ in 0..10 {
arena.clear();
Expand All @@ -145,7 +145,7 @@ pub fn test_typed_arena_clear() {
}

#[bench]
pub fn bench_typed_arena_clear(b: &mut Bencher) {
fn bench_typed_arena_clear(b: &mut Bencher) {
let mut arena = TypedArena::default();
b.iter(|| {
arena.alloc(Point { x: 1, y: 2, z: 3 });
Expand All @@ -154,7 +154,7 @@ pub fn bench_typed_arena_clear(b: &mut Bencher) {
}

#[bench]
pub fn bench_typed_arena_clear_100(b: &mut Bencher) {
fn bench_typed_arena_clear_100(b: &mut Bencher) {
let mut arena = TypedArena::default();
b.iter(|| {
for _ in 0..100 {
Expand Down Expand Up @@ -230,15 +230,15 @@ fn test_typed_arena_drop_small_count() {
}

#[bench]
pub fn bench_noncopy(b: &mut Bencher) {
fn bench_noncopy(b: &mut Bencher) {
let arena = TypedArena::default();
b.iter(|| {
arena.alloc(Noncopy { string: "hello world".to_string(), array: vec![1, 2, 3, 4, 5] })
})
}

#[bench]
pub fn bench_noncopy_nonarena(b: &mut Bencher) {
fn bench_noncopy_nonarena(b: &mut Bencher) {
b.iter(|| {
let _: Box<_> =
Box::new(Noncopy { string: "hello world".to_string(), array: vec![1, 2, 3, 4, 5] });
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#![feature(never_type)]
#![feature(rustdoc_internals)]
#![feature(stmt_expr_attributes)]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

pub mod util {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast_ir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(feature = "nightly", feature(never_type))]
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
#![warn(unreachable_pub)]
// tidy-alphabetical-end

#[cfg(feature = "nightly")]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/delegation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ use rustc_span::Span;
use rustc_target::spec::abi;
use {rustc_ast as ast, rustc_hir as hir};

use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericArgs};
use super::{GenericArgsMode, ImplTraitContext, LoweringContext, ParamMode};
use crate::{ImplTraitPosition, ResolverAstLoweringExt};

pub(crate) struct DelegationResults<'hir> {
Expand Down Expand Up @@ -323,7 +323,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
delegation.path.span,
ast_segment,
ParamMode::Optional,
ParenthesizedGenericArgs::Err,
GenericArgsMode::Err,
ImplTraitContext::Disallowed(ImplTraitPosition::Path),
None,
);
Expand Down
Loading
Loading