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 6 pull requests #101575

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0126f7f
Allow lint passes to be bound by `TyCtxt`
Jarcho Sep 6, 2022
bdc865d
remove unnecessary `PartialOrd` and `Ord`
TaKO8Ki Sep 7, 2022
12ac36c
RPITIT placeholder items
compiler-errors Aug 31, 2022
f8a0f3a
Lower RPITIT to ImplTraitPlaceholder item
compiler-errors Aug 31, 2022
62ed2fe
Implement projection for ImplTraitPlaceholder
compiler-errors Aug 31, 2022
582efcc
Rustdoc support
compiler-errors Aug 31, 2022
15b8de8
Check that impl types actually satisfy RPITIT bounds
compiler-errors Aug 31, 2022
dffcca0
Add tests
compiler-errors Aug 31, 2022
57a56bd
Make clippy happy
compiler-errors Aug 31, 2022
d5a83c4
Make async fn in traits work
compiler-errors Sep 2, 2022
63360b0
Address rebase issues, make async fn in trait work
compiler-errors Sep 2, 2022
e41b430
Address nits
compiler-errors Sep 2, 2022
e032216
Bless tests, fix ICE with ImplTraitPlaceholder
compiler-errors Sep 2, 2022
0e53c86
Deeply check that method signatures match, and allow for nested RPITITs
compiler-errors Sep 2, 2022
2a4a0ec
Handle generic parameters.
cjgillot Sep 6, 2022
8bf0bab
Tweak feature error, add test
compiler-errors Sep 6, 2022
815f5b2
Appease clippy again
compiler-errors Sep 6, 2022
1c05205
Rebase fallout
compiler-errors Sep 8, 2022
09430b7
Adjust pretty printing of RPITITs
compiler-errors Sep 8, 2022
60b4958
translations(rustc_session): migrates session.rs and config.rs
beowolx Aug 26, 2022
0f06320
translations(rustc_session): migrate TargetDataLayout::parse
beowolx Sep 2, 2022
24de943
translations(rustc_session): remove lint allow rule to the methods ma…
beowolx Sep 5, 2022
ddb225f
fixes #101477: Recover from typo where == is used in place of =
chenyukang Sep 7, 2022
5c9d28d
Opaque types' generic params do not imply anything about their hidden…
oli-obk Jul 5, 2022
5cd3cc1
Uncomment unsound code example
oli-obk Aug 25, 2022
64d11fc
Clarify some diagnostic messages
oli-obk Aug 25, 2022
0e497a7
translations(rustc_session): migrates two diagnostics in session.rs
beowolx Sep 8, 2022
ac2d840
Rollup merge of #98933 - oli-obk:opaque_type_late_bound_lifetimes, r=…
Dylan-DPC Sep 8, 2022
8928eb4
Rollup merge of #101041 - LuisCardosoOliveira:translation-rename-attr…
Dylan-DPC Sep 8, 2022
5762de5
Rollup merge of #101224 - compiler-errors:rpitit, r=oli-obk
Dylan-DPC Sep 8, 2022
319a845
Rollup merge of #101501 - Jarcho:tcx_lint_passes, r=davidtwco
Dylan-DPC Sep 8, 2022
2fabb76
Rollup merge of #101515 - chenyukang:fix-101477, r=fee1-dead
Dylan-DPC Sep 8, 2022
2a49ae6
Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, …
Dylan-DPC Sep 8, 2022
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
Prev Previous commit
Next Next commit
translations(rustc_session): migrates two diagnostics in session.rs
  • Loading branch information
beowolx committed Sep 8, 2022
commit 0e497a714ebfefbee094b8475ea9aa4eeaa7b692
6 changes: 4 additions & 2 deletions compiler/rustc_error_messages/locales/en-US/session.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ session_feature_diagnostic_for_issue =
session_feature_diagnostic_help =
add `#![feature({$feature})]` to the crate attributes to enable

session_target_data_layout_parse_error = {$err}

session_not_circumvent_feature = `-Zunleash-the-miri-inside-of-you` may not be used to circumvent feature gates, except when testing error paths in the CTFE engine

session_profile_use_file_does_not_exist = file `{$path}` passed to `-C profile-use` does not exist.
Expand Down Expand Up @@ -54,3 +52,7 @@ session_target_inconsistent_architecture = inconsistent target specification: "d
session_target_inconsistent_pointer_width = inconsistent target specification: "data-layout" claims pointers are {$pointer_size}-bit, while "target-pointer-width" is `{$target}`

session_target_invalid_bits_size = {$err}

session_target_stack_protector_not_supported = `-Z stack-protector={$stack_protector}` is not supported for target {$target_triple} and will be ignored

session_split_debuginfo_unstable_platform = `-Csplit-debuginfo={$debuginfo}` is unstable on this platform
5 changes: 4 additions & 1 deletion compiler/rustc_errors/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rustc_lint_defs::{Applicability, LintExpectationId};
use rustc_span::edition::LATEST_STABLE_EDITION;
use rustc_span::symbol::{Ident, MacroRulesNormalizedIdent, Symbol};
use rustc_span::{edition::Edition, Span, DUMMY_SP};
use rustc_target::spec::PanicStrategy;
use rustc_target::spec::{PanicStrategy, SplitDebuginfo, StackProtector, TargetTriple};
use std::borrow::Cow;
use std::fmt;
use std::hash::{Hash, Hasher};
Expand Down Expand Up @@ -93,6 +93,9 @@ into_diagnostic_arg_using_display!(
Ident,
MacroRulesNormalizedIdent,
ParseIntError,
StackProtector,
&TargetTriple,
SplitDebuginfo
);

impl IntoDiagnosticArg for bool {
Expand Down
14 changes: 14 additions & 0 deletions compiler/rustc_session/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use rustc_errors::{fluent, DiagnosticBuilder, Handler, MultiSpan};
use rustc_macros::SessionDiagnostic;
use rustc_span::{Span, Symbol};
use rustc_target::abi::TargetDataLayoutErrors;
use rustc_target::spec::{SplitDebuginfo, StackProtector, TargetTriple};

#[derive(SessionDiagnostic)]
#[diag(session::incorrect_cgu_reuse_type)]
Expand Down Expand Up @@ -156,3 +157,16 @@ pub struct UnstableVirtualFunctionElimination;
pub struct UnsupportedDwarfVersion {
pub dwarf_version: u32,
}

#[derive(SessionDiagnostic)]
#[diag(session::target_stack_protector_not_supported)]
pub struct StackProtectorNotSupportedForTarget<'a> {
pub stack_protector: StackProtector,
pub target_triple: &'a TargetTriple,
}

#[derive(SessionDiagnostic)]
#[diag(session::split_debuginfo_unstable_platform)]
pub struct SplitDebugInfoUnstablePlatform {
pub debuginfo: SplitDebuginfo,
}
18 changes: 8 additions & 10 deletions compiler/rustc_session/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ use crate::config::{self, CrateType, InstrumentCoverage, OptLevel, OutputType, S
use crate::errors::{
CannotEnableCrtStaticLinux, CannotMixAndMatchSanitizers, LinkerPluginToWindowsNotSupported,
NotCircumventFeature, ProfileSampleUseFileDoesNotExist, ProfileUseFileDoesNotExist,
SanitizerCfiEnabled, SanitizerNotSupported, SanitizersNotSupported, TargetRequiresUnwindTables,
UnstableVirtualFunctionElimination, UnsupportedDwarfVersion,
SanitizerCfiEnabled, SanitizerNotSupported, SanitizersNotSupported,
SplitDebugInfoUnstablePlatform, StackProtectorNotSupportedForTarget,
TargetRequiresUnwindTables, UnstableVirtualFunctionElimination, UnsupportedDwarfVersion,
};
use crate::parse::{add_feature_diagnostics, ParseSess};
use crate::search_paths::{PathKind, SearchPath};
Expand Down Expand Up @@ -1544,10 +1545,10 @@ fn validate_commandline_args_with_session_available(sess: &Session) {

if sess.opts.unstable_opts.stack_protector != StackProtector::None {
if !sess.target.options.supports_stack_protector {
sess.warn(&format!(
"`-Z stack-protector={}` is not supported for target {} and will be ignored",
sess.opts.unstable_opts.stack_protector, sess.opts.target_triple
))
sess.emit_warning(StackProtectorNotSupportedForTarget {
stack_protector: sess.opts.unstable_opts.stack_protector,
target_triple: &sess.opts.target_triple,
});
}
}

Expand All @@ -1560,10 +1561,7 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
if !sess.target.options.supported_split_debuginfo.contains(&sess.split_debuginfo())
&& !sess.opts.unstable_opts.unstable_options
{
sess.err(&format!(
"`-Csplit-debuginfo={}` is unstable on this platform",
sess.split_debuginfo()
));
sess.emit_err(SplitDebugInfoUnstablePlatform { debuginfo: sess.split_debuginfo() });
}
}

Expand Down