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 8 pull requests #111080

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5dd54fd
lint/ctypes: ext. abi fn-ptr in internal abi fn
davidtwco Mar 1, 2023
c1dcf26
abi: avoid ice for non-ffi-safe fn ptrs
davidtwco Mar 1, 2023
05c1e6b
stabilize debugger visualizer attribute
gibbyfree Mar 2, 2023
92ae35f
lint/ctypes: multiple external fn-ptrs in ty
davidtwco Mar 2, 2023
5c34f77
whitespace, delete unstable book page
gibbyfree Mar 2, 2023
3e7ca3e
lint/ctypes: check other types for ext. fn-ptr ty
davidtwco Mar 2, 2023
1a7132d
rustdoc-search: fix incorrect doc comment
notriddle Apr 14, 2023
4c11822
rustdoc: restructure type search engine to pick-and-use IDs
notriddle Apr 15, 2023
1ece1ea
Stablize raw-dylib, link_ordinal and -Cdlltool
dpaoliello Mar 27, 2023
b6f81e0
rustdoc-search: give longer notification for type corrections
notriddle Apr 19, 2023
e0a7462
rustdoc-search: clean up `checkIfInGenerics` call at end of `checkType`
notriddle Apr 20, 2023
7529d87
rustdoc-search: make type name correction choice deterministic
notriddle Apr 20, 2023
395840c
rustdoc-search: use more descriptive "x not found; y instead" message
notriddle Apr 20, 2023
d77f636
libtest: add tests for junit output format
durin42 Apr 21, 2023
610f827
junit: also include per-case stdout in xml
durin42 Apr 21, 2023
d5e7ac5
avoid duplicating TLS state between test std and realstd
RalfJung Apr 28, 2023
58537cd
junit: fix typo in comment and don't include output for passes when n…
durin42 Apr 28, 2023
bc68de9
remove pointless `FIXME` in `bootstrap::download`
onur-ozkan May 1, 2023
b540b5f
Tweak borrow suggestion
compiler-errors Apr 18, 2023
1ca3bdf
Rename some suggestion/note functions
compiler-errors Apr 18, 2023
f0e7af4
Make suggest_deref_or_ref return a multipart suggestion
compiler-errors Apr 18, 2023
b00e5f3
remove bootstrap from tests
gibbyfree Mar 6, 2023
c9653a6
fix stderrs
gibbyfree Mar 6, 2023
1795530
Rollup merge of #108611 - davidtwco:issue-94223-external-abi-fn-ptr-i…
matthiaskrgr May 1, 2023
dcef3b7
Rollup merge of #108668 - gibbyfree:stabilizedebuggervisualizer, r=we…
matthiaskrgr May 1, 2023
ca7717e
Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wes…
matthiaskrgr May 1, 2023
b3261cb
Rollup merge of #110371 - notriddle:notriddle/search-corrections, r=G…
matthiaskrgr May 1, 2023
4af1284
Rollup merge of #110504 - compiler-errors:tweak-borrow-sugg, r=cjgillot
matthiaskrgr May 1, 2023
35bc61e
Rollup merge of #110651 - durin42:xunit-stdout, r=cuviper
matthiaskrgr May 1, 2023
ffd8460
Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-se
matthiaskrgr May 1, 2023
5945ab8
Rollup merge of #111069 - ozkanonur:remove-pointless-fixme, r=albertl…
matthiaskrgr May 1, 2023
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
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ codegen_llvm_error_writing_def_file =
Error writing .DEF file: {$error}

codegen_llvm_error_calling_dlltool =
Error calling dlltool: {$error}
Error calling dlltool '{$dlltool_path}': {$error}

codegen_llvm_dlltool_fail_import_library =
Dlltool could not create import library: {$stdout}
Expand Down
12 changes: 8 additions & 4 deletions compiler/rustc_codegen_llvm/src/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
"arm" => ("arm", "--32"),
_ => panic!("unsupported arch {}", sess.target.arch),
};
let result = std::process::Command::new(dlltool)
let result = std::process::Command::new(&dlltool)
.args([
"-d",
def_file_path.to_str().unwrap(),
Expand All @@ -218,9 +218,13 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {

match result {
Err(e) => {
sess.emit_fatal(ErrorCallingDllTool { error: e });
sess.emit_fatal(ErrorCallingDllTool {
dlltool_path: dlltool.to_string_lossy(),
error: e,
});
}
Ok(output) if !output.status.success() => {
// dlltool returns '0' on failure, so check for error output instead.
Ok(output) if !output.stderr.is_empty() => {
sess.emit_fatal(DlltoolFailImportLibrary {
stdout: String::from_utf8_lossy(&output.stdout),
stderr: String::from_utf8_lossy(&output.stderr),
Expand Down Expand Up @@ -431,7 +435,7 @@ fn string_to_io_error(s: String) -> io::Error {

fn find_binutils_dlltool(sess: &Session) -> OsString {
assert!(sess.target.options.is_like_windows && !sess.target.options.is_like_msvc);
if let Some(dlltool_path) = &sess.opts.unstable_opts.dlltool {
if let Some(dlltool_path) = &sess.opts.cg.dlltool {
return dlltool_path.clone().into_os_string();
}

Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_codegen_llvm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ pub(crate) struct ErrorWritingDEFFile {

#[derive(Diagnostic)]
#[diag(codegen_llvm_error_calling_dlltool)]
pub(crate) struct ErrorCallingDllTool {
pub(crate) struct ErrorCallingDllTool<'a> {
pub dlltool_path: Cow<'a, str>,
pub error: std::io::Error,
}

Expand Down
9 changes: 0 additions & 9 deletions compiler/rustc_codegen_ssa/src/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,15 +592,6 @@ fn should_inherit_track_caller(tcx: TyCtxt<'_>, def_id: DefId) -> bool {

fn check_link_ordinal(tcx: TyCtxt<'_>, attr: &ast::Attribute) -> Option<u16> {
use rustc_ast::{LitIntType, LitKind, MetaItemLit};
if !tcx.features().raw_dylib && tcx.sess.target.arch == "x86" {
feature_err(
&tcx.sess.parse_sess,
sym::raw_dylib,
attr.span,
"`#[link_ordinal]` is unstable on x86",
)
.emit();
}
let meta_item_list = attr.meta_item_list();
let meta_item_list = meta_item_list.as_deref();
let sole_meta_list = match meta_item_list {
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ declare_features! (
(accepted, copy_closures, "1.26.0", Some(44490), None),
/// Allows `crate` in paths.
(accepted, crate_in_paths, "1.30.0", Some(45477), None),
/// Allows using `#[debugger_visualizer]` attribute.
(accepted, debugger_visualizer, "CURRENT_RUSTC_VERSION", Some(95939), None),
/// Allows rustc to inject a default alloc_error_handler
(accepted, default_alloc_error_handler, "1.68.0", Some(66741), None),
/// Allows using assigning a default type to type parameters in algebraic data type definitions.
Expand Down Expand Up @@ -278,6 +280,8 @@ declare_features! (
(accepted, pub_restricted, "1.18.0", Some(32409), None),
/// Allows use of the postfix `?` operator in expressions.
(accepted, question_mark, "1.13.0", Some(31436), None),
/// Allows the use of raw-dylibs (RFC 2627).
(accepted, raw_dylib, "CURRENT_RUSTC_VERSION", Some(58713), None),
/// Allows keywords to be escaped for use as identifiers.
(accepted, raw_identifiers, "1.30.0", Some(48589), None),
/// Allows relaxing the coherence rules such that
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,6 @@ declare_features! (
(active, custom_inner_attributes, "1.30.0", Some(54726), None),
/// Allows custom test frameworks with `#![test_runner]` and `#[test_case]`.
(active, custom_test_frameworks, "1.30.0", Some(50297), None),
/// Allows using `#[debugger_visualizer]`.
(active, debugger_visualizer, "1.62.0", Some(95939), None),
/// Allows declarative macros 2.0 (`macro`).
(active, decl_macro, "1.17.0", Some(39412), None),
/// Allows default type parameters to influence type inference.
Expand Down Expand Up @@ -485,8 +483,6 @@ declare_features! (
(active, precise_pointer_size_matching, "1.32.0", Some(56354), None),
/// Allows macro attributes on expressions, statements and non-inline modules.
(active, proc_macro_hygiene, "1.30.0", Some(54727), None),
/// Allows the use of raw-dylibs (RFC 2627).
(active, raw_dylib, "1.65.0", Some(58713), None),
/// Allows `&raw const $place_expr` and `&raw mut $place_expr` expressions.
(active, raw_ref_op, "1.41.0", Some(64490), None),
/// Allows using the `#[register_tool]` attribute.
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,16 +403,16 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
),

// Debugging
ungated!(
debugger_visualizer, Normal,
template!(List: r#"natvis_file = "...", gdb_script_file = "...""#), DuplicatesOk
),

// ==========================================================================
// Unstable attributes:
// ==========================================================================

// RFC #3191: #[debugger_visualizer] support
gated!(
debugger_visualizer, Normal, template!(List: r#"natvis_file = "...", gdb_script_file = "...""#),
DuplicatesOk, experimental!(debugger_visualizer)
),

// Linking:
gated!(
naked, Normal, template!(Word), WarnFollowing, @only_local: true,
Expand Down
Loading