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 11 pull requests #103597

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f310d4c
Don't auto-publish lib crates
Veykril Sep 27, 2022
d7fb8d5
Migrate assists to format args captures, part 2
DropDemBits Oct 10, 2022
d5f467a
Substitute some VSCode variables in the VSCode client
Veykril Oct 16, 2022
a2e4f78
Auto merge of #13399 - DropDemBits:assists-format-args-capture-pt2, r…
bors Oct 17, 2022
40cbeb5
Auto merge of #13423 - Veykril:vscode-vars, r=Veykril
bors Oct 17, 2022
f079792
Auto merge of #13302 - Veykril:auto-publish, r=Veykril
bors Oct 17, 2022
6f43597
Refactor language client handling
Veykril Oct 17, 2022
8aaafdd
Properly reload changed configs for server start
Veykril Oct 17, 2022
d68616a
Make more things private
Veykril Oct 17, 2022
0421756
Implement stop and start server commands
Veykril Oct 17, 2022
7b5c943
Downgrade vscode types dependency
Veykril Oct 17, 2022
d63c44e
Cleanup output channels
Veykril Oct 17, 2022
067c410
Auto merge of #13426 - Veykril:client-refactor, r=Veykril
bors Oct 17, 2022
e41023c
Make flycheck workdone progress reports cancellable
Veykril Oct 17, 2022
106285b
Auto merge of #13427 - Veykril:cancel-check, r=Veykril
bors Oct 17, 2022
a762bac
fix: Fix formatting requests hanging when r-a is still starting
Veykril Oct 17, 2022
4d4c05d
Auto merge of #13428 - Veykril:fmt-stuck, r=Veykril
bors Oct 17, 2022
8047512
Revert "feat: Diagnose some incorrect usages of the question mark ope…
Veykril Oct 18, 2022
97b357e
Auto merge of #13433 - rust-lang:revert-13354-try-stuff, r=Veykril
bors Oct 18, 2022
9d3e616
Simplify
Veykril Oct 19, 2022
3392573
Auto merge of #13439 - Veykril:simplify, r=Veykril
bors Oct 19, 2022
653dafa
Add some sysroot logging
Veykril Oct 19, 2022
82ac6f7
Auto merge of #13441 - Veykril:sysroot-logging, r=Veykril
bors Oct 19, 2022
7e2c41d
Implement invocation strategy config for build scripts
Veykril Aug 27, 2022
4a287d2
Implement invocation strategy config for checkOnSave
Veykril Sep 15, 2022
5174b65
Use correct invocation strategy config for checkOnSave
Veykril Sep 15, 2022
7db5029
{manifest-path} interpolation
Veykril Sep 26, 2022
4673236
Remove simplistic interpolation for manifest-path
Veykril Oct 19, 2022
a77ac93
Auto merge of #13128 - Veykril:invocation-strategy, r=Veykril
bors Oct 19, 2022
69b8456
Don't catch the server activation error
Veykril Oct 20, 2022
32614e2
Auto merge of #13444 - Veykril:rethrow-err, r=Veykril
bors Oct 20, 2022
5bff6c5
feat: add multiple getters mode in `generate_getter`
feniljain Oct 7, 2022
f3cce5f
Auto merge of #13365 - feniljain:master, r=Veykril
bors Oct 20, 2022
de195ff
fix: Fix DidSaveDocument requests blocking the server on startup
Veykril Oct 20, 2022
e05df93
Workaround the python vscode extension's polyfill
yotamofek Oct 20, 2022
7741e3d
Auto merge of #13448 - yotamofek:python-ext-polyfill-workaround, r=Ve…
bors Oct 20, 2022
2481721
Auto merge of #13447 - Veykril:didsavedoc-block, r=Veykril
bors Oct 20, 2022
a8e0a20
internal: Properly handle language configuration config changes
Veykril Oct 20, 2022
69f01fd
Auto merge of #13451 - Veykril:lang-config, r=Veykril
bors Oct 20, 2022
1cb4607
internal: Properly handle commands in the VSCode client when the serv…
Veykril Oct 21, 2022
8ee23f4
Auto merge of #13453 - Veykril:disabled-commands, r=Veykril
bors Oct 21, 2022
7ee7225
scip: minor clean-ups
emilio Oct 22, 2022
bd49d01
ide: Remove unnecessary continue.
emilio Oct 22, 2022
ec6d72b
scip: Rewrite tests to be closer to what we actually do.
emilio Oct 21, 2022
b643dd6
Auto merge of #13461 - emilio:ide-cleanup-continue, r=Veykril
bors Oct 22, 2022
d3b7e94
Auto merge of #13460 - emilio:scip-cleanups, r=Veykril
bors Oct 22, 2022
6459d7f
Support const generics for builtin derive macro
lowr Oct 22, 2022
19efa0b
Auto merge of #13463 - lowr:fix/builtin-derive-with-const-generics, r…
bors Oct 22, 2022
0f8904e
Implement invocation location config
Veykril Oct 22, 2022
b25f657
Auto merge of #13466 - Veykril:invocation-location, r=Veykril
bors Oct 22, 2022
859f559
Handle multiple projects sharing dependency correctly in `once` strategy
Veykril Oct 23, 2022
43fb956
Auto merge of #13471 - Veykril:invoc-strategy-once, r=Veykril
bors Oct 23, 2022
8b984e5
fake capture if min_captures empty
ouz-a Aug 11, 2022
ba847ca
Enable varargs support for calling conventions other than C or cdecl
Soveu Aug 8, 2022
65ef625
Apply suggestions from code review
jackh726 Aug 16, 2022
de78c32
Cleanup message and bless tests
jackh726 Oct 23, 2022
63d1a72
rustdoc: don't mark Box<T> as Iterator, Read, etc
jsha Oct 23, 2022
c246a3d
more dupe typos again
Rageking8 Oct 25, 2022
626d7fc
rustdoc: combine shared CSS between `.*-line-numbers`
notriddle Oct 25, 2022
6ea75ae
llvm-16: Don't initialize removed legacy passes
maurer Oct 25, 2022
67c4c1f
Update cargo
weihanglo Oct 26, 2022
0c4a01a
check lld version to choose correct flag for tests
belovdv Sep 21, 2022
99a74af
ptr::eq: clarify that comparing dyn Trait is fragile
RalfJung Oct 26, 2022
1946a18
explicitly mention that both components of wide prts are compared
RalfJung Oct 26, 2022
22a6bc4
:arrow_up: rust-analyzer
lnicola Oct 26, 2022
cce46e9
Fix typo in docs for `guaranteed_ne`
Oct 26, 2022
8b001e6
Rollup merge of #97971 - Soveu:varargs, r=jackh726
compiler-errors Oct 26, 2022
355e23e
Rollup merge of #100452 - ouz-a:issue-93242, r=jackh726
compiler-errors Oct 26, 2022
485adb5
Rollup merge of #102101 - BelovDV:new-check-lld-version, r=petrochenkov
compiler-errors Oct 26, 2022
978597f
Rollup merge of #103432 - jsha:box-is-not-notable, r=GuillaumeGomez
compiler-errors Oct 26, 2022
150dbca
Rollup merge of #103526 - Rageking8:more-dupe-typos-again, r=Mark-Sim…
compiler-errors Oct 26, 2022
c5b04de
Rollup merge of #103537 - notriddle:notriddle/line-numbers, r=Guillau…
compiler-errors Oct 26, 2022
758a99f
Rollup merge of #103549 - maurer:llvm-main, r=cuviper
compiler-errors Oct 26, 2022
29ad394
Rollup merge of #103558 - weihanglo:update-cargo, r=weihanglo
compiler-errors Oct 26, 2022
f619f01
Rollup merge of #103567 - RalfJung:ptr-eq-dyn-trait, r=dtolnay
compiler-errors Oct 26, 2022
2f21ead
Rollup merge of #103579 - lnicola:rust-analyzer-2022-10-26, r=lnicola
compiler-errors Oct 26, 2022
39796bd
Rollup merge of #103580 - lukas-code:guaranteed_ne, r=GuillaumeGomez
compiler-errors Oct 26, 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
3 changes: 3 additions & 0 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ declare_features! (
(active, exclusive_range_pattern, "1.11.0", Some(37854), None),
/// Allows exhaustive pattern matching on types that contain uninhabited types.
(active, exhaustive_patterns, "1.13.0", Some(51085), None),
/// Allows using `efiapi`, `sysv64` and `win64` as calling convention
/// for functions with varargs.
(active, extended_varargs_abi_support, "1.65.0", Some(100189), None),
/// Allows defining `extern type`s.
(active, extern_types, "1.23.0", Some(43467), None),
/// Allows the use of `#[ffi_const]` on foreign functions.
Expand Down
46 changes: 33 additions & 13 deletions compiler/rustc_hir_analysis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ use rustc_middle::middle;
use rustc_middle::ty::query::Providers;
use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_middle::util;
use rustc_session::config::EntryFnType;
use rustc_session::{config::EntryFnType, parse::feature_err};
use rustc_span::{symbol::sym, Span, DUMMY_SP};
use rustc_target::spec::abi::Abi;
use rustc_trait_selection::traits::error_reporting::TypeErrCtxtExt as _;
Expand All @@ -118,20 +118,40 @@ use astconv::AstConv;
use bounds::Bounds;

fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi, span: Span) {
match (decl.c_variadic, abi) {
// The function has the correct calling convention, or isn't a "C-variadic" function.
(false, _) | (true, Abi::C { .. }) | (true, Abi::Cdecl { .. }) => {}
// The function is a "C-variadic" function with an incorrect calling convention.
(true, _) => {
let mut err = struct_span_err!(
tcx.sess,
const ERROR_HEAD: &str = "C-variadic function must have a compatible calling convention";
const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `win64`, `sysv64` or `efiapi`";
const CONVENTIONS_STABLE: &str = "`C` or `cdecl`";
const UNSTABLE_EXPLAIN: &str =
"using calling conventions other than `C` or `cdecl` for varargs functions is unstable";

if !decl.c_variadic || matches!(abi, Abi::C { .. } | Abi::Cdecl { .. }) {
return;
}

let extended_abi_support = tcx.features().extended_varargs_abi_support;
let conventions = match (extended_abi_support, abi.supports_varargs()) {
// User enabled additional ABI support for varargs and function ABI matches those ones.
(true, true) => return,

// Using this ABI would be ok, if the feature for additional ABI support was enabled.
// Return CONVENTIONS_STABLE, because we want the other error to look the same.
(false, true) => {
feature_err(
&tcx.sess.parse_sess,
sym::extended_varargs_abi_support,
span,
E0045,
"C-variadic function must have C or cdecl calling convention"
);
err.span_label(span, "C-variadics require C or cdecl calling convention").emit();
UNSTABLE_EXPLAIN,
)
.emit();
CONVENTIONS_STABLE
}
}

(false, false) => CONVENTIONS_STABLE,
(true, false) => CONVENTIONS_UNSTABLE,
};

let mut err = struct_span_err!(tcx.sess, span, E0045, "{}, like {}", ERROR_HEAD, conventions);
err.span_label(span, ERROR_HEAD).emit();
}

fn require_same_types<'tcx>(
Expand Down
7 changes: 6 additions & 1 deletion compiler/rustc_hir_typeck/src/upvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

// We now fake capture information for all variables that are mentioned within the closure
// We do this after handling migrations so that min_captures computes before
if !enable_precise_capture(self.tcx, span) {
if !enable_precise_capture(self.tcx, span)
// (ouz-a) #93242 - ICE happens because closure_min_captures is empty with
// 2021 edition, because it sets `enable_precise_capture` to true, which won't allow us
// fake capture information this check sidesteps that and avoids the ICE.
|| (infer_kind == None && self.typeck_results.borrow().closure_min_captures.is_empty())
{
let mut capture_information: InferredCaptureInformation<'tcx> = Default::default();

if let Some(upvars) = self.tcx.upvars_mentioned(closure_def_id) {
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ extern "C" void LLVMInitializePasses() {
initializeAnalysis(Registry);
initializeTransformUtils(Registry);
initializeInstCombine(Registry);
#if LLVM_VERSION_LT(16, 0)
initializeInstrumentation(Registry);
#endif
initializeTarget(Registry);
}

Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ symbols! {
export_name,
expr,
extended_key_value_attributes,
extended_varargs_abi_support,
extern_absolute_paths,
extern_crate_item_prelude,
extern_crate_self,
Expand Down
22 changes: 22 additions & 0 deletions compiler/rustc_target/src/spec/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,28 @@ pub enum Abi {
RustCold,
}

impl Abi {
pub fn supports_varargs(self) -> bool {
// * C and Cdecl obviously support varargs.
// * C can be based on SysV64 or Win64, so they must support varargs.
// * EfiApi is based on Win64 or C, so it also supports it.
//
// * Stdcall does not, because it would be impossible for the callee to clean
// up the arguments. (callee doesn't know how many arguments are there)
// * Same for Fastcall, Vectorcall and Thiscall.
// * System can become Stdcall, so is also a no-no.
// * Other calling conventions are related to hardware or the compiler itself.
match self {
Self::C { .. }
| Self::Cdecl { .. }
| Self::Win64 { .. }
| Self::SysV64 { .. }
| Self::EfiApi => true,
_ => false,
}
}
}

#[derive(Copy, Clone)]
pub struct AbiData {
abi: Abi,
Expand Down
10 changes: 5 additions & 5 deletions library/alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,8 @@ impl<T: ?Sized> Rc<T> {

#[inline]
#[stable(feature = "ptr_eq", since = "1.17.0")]
/// Returns `true` if the two `Rc`s point to the same allocation
/// (in a vein similar to [`ptr::eq`]).
/// Returns `true` if the two `Rc`s point to the same allocation in a vein similar to
/// [`ptr::eq`]. See [that function][`ptr::eq`] for caveats when comparing `dyn Trait` pointers.
///
/// # Examples
///
Expand Down Expand Up @@ -2419,9 +2419,9 @@ impl<T: ?Sized> Weak<T> {
}
}

/// Returns `true` if the two `Weak`s point to the same allocation (similar to
/// [`ptr::eq`]), or if both don't point to any allocation
/// (because they were created with `Weak::new()`).
/// Returns `true` if the two `Weak`s point to the same allocation similar to [`ptr::eq`], or if
/// both don't point to any allocation (because they were created with `Weak::new()`). See [that
/// function][`ptr::eq`] for caveats when comparing `dyn Trait` pointers.
///
/// # Notes
///
Expand Down
10 changes: 5 additions & 5 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,8 @@ impl<T: ?Sized> Arc<T> {
drop(Weak { ptr: self.ptr });
}

/// Returns `true` if the two `Arc`s point to the same allocation
/// (in a vein similar to [`ptr::eq`]).
/// Returns `true` if the two `Arc`s point to the same allocation in a vein similar to
/// [`ptr::eq`]. See [that function][`ptr::eq`] for caveats when comparing `dyn Trait` pointers.
///
/// # Examples
///
Expand Down Expand Up @@ -2069,9 +2069,9 @@ impl<T: ?Sized> Weak<T> {
}
}

/// Returns `true` if the two `Weak`s point to the same allocation (similar to
/// [`ptr::eq`]), or if both don't point to any allocation
/// (because they were created with `Weak::new()`).
/// Returns `true` if the two `Weak`s point to the same allocation similar to [`ptr::eq`], or if
/// both don't point to any allocation (because they were created with `Weak::new()`). See [that
/// function][`ptr::eq`] for caveats when comparing `dyn Trait` pointers.
///
/// # Notes
///
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ impl<T: ?Sized> *const T {

/// Returns whether two pointers are guaranteed to be inequal.
///
/// At runtime this function behaves like `Some(self == other)`.
/// At runtime this function behaves like `Some(self != other)`.
/// However, in some contexts (e.g., compile-time evaluation),
/// it is not always possible to determine inequality of two pointers, so this function may
/// spuriously return `None` for pointers that later actually turn out to have its inequality known.
Expand Down
41 changes: 6 additions & 35 deletions library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,12 @@ pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
/// by their address rather than comparing the values they point to
/// (which is what the `PartialEq for &T` implementation does).
///
/// When comparing wide pointers, both the address and the metadata are tested for equality.
/// However, note that comparing trait object pointers (`*const dyn Trait`) is unrealiable: pointers
/// to values of the same underlying type can compare inequal (because vtables are duplicated in
/// multiple codegen units), and pointers to values of *different* underlying type can compare equal
/// (since identical vtables can be deduplicated within a codegen unit).
///
/// # Examples
///
/// ```
Expand All @@ -1759,41 +1765,6 @@ pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
/// assert!(!std::ptr::eq(&a[..2], &a[..3]));
/// assert!(!std::ptr::eq(&a[0..2], &a[1..3]));
/// ```
///
/// Traits are also compared by their implementation:
///
/// ```
/// #[repr(transparent)]
/// struct Wrapper { member: i32 }
///
/// trait Trait {}
/// impl Trait for Wrapper {}
/// impl Trait for i32 {}
///
/// let wrapper = Wrapper { member: 10 };
///
/// // Pointers have equal addresses.
/// assert!(std::ptr::eq(
/// &wrapper as *const Wrapper as *const u8,
/// &wrapper.member as *const i32 as *const u8
/// ));
///
/// // Objects have equal addresses, but `Trait` has different implementations.
/// assert!(!std::ptr::eq(
/// &wrapper as &dyn Trait,
/// &wrapper.member as &dyn Trait,
/// ));
/// assert!(!std::ptr::eq(
/// &wrapper as &dyn Trait as *const dyn Trait,
/// &wrapper.member as &dyn Trait as *const dyn Trait,
/// ));
///
/// // Converting the reference to a `*const u8` compares by address.
/// assert!(std::ptr::eq(
/// &wrapper as &dyn Trait as *const dyn Trait as *const u8,
/// &wrapper.member as &dyn Trait as *const dyn Trait as *const u8,
/// ));
/// ```
#[stable(feature = "ptr_eq", since = "1.17.0")]
#[inline]
pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ impl<T: ?Sized> *mut T {

/// Returns whether two pointers are guaranteed to be inequal.
///
/// At runtime this function behaves like `Some(self == other)`.
/// At runtime this function behaves like `Some(self != other)`.
/// However, in some contexts (e.g., compile-time evaluation),
/// it is not always possible to determine inequality of two pointers, so this function may
/// spuriously return `None` for pointers that later actually turn out to have its inequality known.
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sync/mpsc/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl<T> Packet<T> {
match self.queue.producer_addition().cnt.fetch_add(1, Ordering::SeqCst) {
// As described in the mod's doc comment, -1 == wakeup
-1 => UpWoke(self.take_to_wake()),
// As as described before, SPSC queues must be >= -2
// As described before, SPSC queues must be >= -2
-2 => UpSuccess,

// Be sure to preserve the disconnected state, and the return value
Expand Down
8 changes: 2 additions & 6 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,9 @@ fn main() {
arg.push(&linker);
cmd.arg(arg);
}
if env::var_os("RUSTDOC_FUSE_LD_LLD").is_some() {
if let Ok(no_threads) = env::var("RUSTDOC_LLD_NO_THREADS") {
cmd.arg("-Clink-arg=-fuse-ld=lld");
if cfg!(windows) {
cmd.arg("-Clink-arg=-Wl,/threads:1");
} else {
cmd.arg("-Clink-arg=-Wl,--threads=1");
}
cmd.arg(format!("-Clink-arg=-Wl,{}", no_threads));
}
// Cargo doesn't pass RUSTDOCFLAGS to proc_macros:
// https://github.com/rust-lang/cargo/issues/4423
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,8 +1152,8 @@ impl Build {
options[0] = Some("-Clink-arg=-fuse-ld=lld".to_string());
}

let threads = if target.contains("windows") { "/threads:1" } else { "--threads=1" };
options[1] = Some(format!("-Clink-arg=-Wl,{}", threads));
let no_threads = util::lld_flag_no_threads(target.contains("windows"));
options[1] = Some(format!("-Clink-arg=-Wl,{}", no_threads));
}

IntoIterator::into_iter(options).flatten()
Expand Down
5 changes: 4 additions & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,10 @@ impl Step for RustdocTheme {
cmd.env("RUSTDOC_LINKER", linker);
}
if builder.is_fuse_ld_lld(self.compiler.host) {
cmd.env("RUSTDOC_FUSE_LD_LLD", "1");
cmd.env(
"RUSTDOC_LLD_NO_THREADS",
util::lld_flag_no_threads(self.compiler.host.contains("windows")),
);
}
try_run(builder, &mut cmd);
}
Expand Down
14 changes: 14 additions & 0 deletions src/bootstrap/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use std::time::{Instant, SystemTime, UNIX_EPOCH};

use crate::builder::Builder;
use crate::config::{Config, TargetSelection};
use crate::OnceCell;

/// A helper macro to `unwrap` a result except also print out details like:
///
Expand Down Expand Up @@ -607,3 +608,16 @@ pub fn get_clang_cl_resource_dir(clang_cl_path: &str) -> PathBuf {
let clang_rt_dir = clang_rt_builtins.parent().expect("The clang lib folder should exist");
clang_rt_dir.to_path_buf()
}

pub fn lld_flag_no_threads(is_windows: bool) -> &'static str {
static LLD_NO_THREADS: OnceCell<(&'static str, &'static str)> = OnceCell::new();
let (windows, other) = LLD_NO_THREADS.get_or_init(|| {
let out = output(Command::new("lld").arg("-flavor").arg("ld").arg("--version"));
let newer = match (out.find(char::is_numeric), out.find('.')) {
(Some(b), Some(e)) => out.as_str()[b..e].parse::<i32>().ok().unwrap_or(14) > 10,
_ => true,
};
if newer { ("/threads:1", "--threads=1") } else { ("/no-threads", "--no-threads") }
});
if is_windows { windows } else { other }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# `extended_varargs_abi_support`

The tracking issue for this feature is: [#100189]

[#100189]: https://github.com/rust-lang/rust/issues/100189

------------------------

This feature adds the possibility of using `sysv64`, `win64` or `efiapi` calling
conventions on functions with varargs.
9 changes: 9 additions & 0 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,15 @@ fn notable_traits_decl(decl: &clean::FnDecl, cx: &Context<'_>) -> String {

if let Some((did, ty)) = decl.output.as_return().and_then(|t| Some((t.def_id(cx.cache())?, t)))
{
// Box has pass-through impls for Read, Write, Iterator, and Future when the
// boxed type implements one of those. We don't want to treat every Box return
// as being notably an Iterator (etc), though, so we exempt it. Pin has the same
// issue, with a pass-through impl for Future.
if Some(did) == cx.tcx().lang_items().owned_box()
|| Some(did) == cx.tcx().lang_items().pin_type()
{
return "".to_string();
}
if let Some(impls) = cx.cache().impls.get(&did) {
for i in impls {
let impl_ = i.inner_impl();
Expand Down
Loading