Skip to content

Commit 27a25df

Browse files
committed
Auto merge of #56962 - nivkner:fixme_fixup4, r=pnkfelix
address some FIXME whose associated issues were marked as closed part of #44366
2 parents 27c4335 + e32c63e commit 27a25df

25 files changed

+54
-94
lines changed

src/librustc_codegen_llvm/llvm/ffi.rs

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,15 +1601,12 @@ extern "C" {
16011601
-> &'a Value;
16021602
pub fn LLVMRustDIBuilderCreateOpDeref() -> i64;
16031603
pub fn LLVMRustDIBuilderCreateOpPlusUconst() -> i64;
1604-
}
16051604

1606-
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
1607-
extern "C" {
1605+
#[allow(improper_ctypes)]
16081606
pub fn LLVMRustWriteTypeToString(Type: &Type, s: &RustString);
1607+
#[allow(improper_ctypes)]
16091608
pub fn LLVMRustWriteValueToString(value_ref: &Value, s: &RustString);
1610-
}
16111609

1612-
extern "C" {
16131610
pub fn LLVMIsAConstantInt(value_ref: &Value) -> Option<&Value>;
16141611
pub fn LLVMIsAConstantFP(value_ref: &Value) -> Option<&Value>;
16151612

@@ -1687,56 +1684,39 @@ extern "C" {
16871684
pub fn LLVMRustDestroyArchive(AR: &'static mut Archive);
16881685

16891686
pub fn LLVMRustGetSectionName(SI: &SectionIterator, data: &mut *const c_char) -> size_t;
1690-
}
16911687

1692-
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
1693-
extern "C" {
1688+
#[allow(improper_ctypes)]
16941689
pub fn LLVMRustWriteTwineToString(T: &Twine, s: &RustString);
1695-
}
16961690

1697-
extern "C" {
16981691
pub fn LLVMContextSetDiagnosticHandler(C: &Context,
16991692
Handler: DiagnosticHandler,
17001693
DiagnosticContext: *mut c_void);
1701-
}
17021694

1703-
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
1704-
extern "C" {
1695+
#[allow(improper_ctypes)]
17051696
pub fn LLVMRustUnpackOptimizationDiagnostic(DI: &'a DiagnosticInfo,
17061697
pass_name_out: &RustString,
17071698
function_out: &mut Option<&'a Value>,
17081699
loc_line_out: &mut c_uint,
17091700
loc_column_out: &mut c_uint,
17101701
loc_filename_out: &RustString,
17111702
message_out: &RustString);
1712-
}
17131703

1714-
extern "C" {
17151704
pub fn LLVMRustUnpackInlineAsmDiagnostic(DI: &'a DiagnosticInfo,
17161705
cookie_out: &mut c_uint,
17171706
message_out: &mut Option<&'a Twine>,
17181707
instruction_out: &mut Option<&'a Value>);
1719-
}
17201708

1721-
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
1722-
extern "C" {
1709+
#[allow(improper_ctypes)]
17231710
pub fn LLVMRustWriteDiagnosticInfoToString(DI: &DiagnosticInfo, s: &RustString);
1724-
}
1725-
1726-
extern "C" {
17271711
pub fn LLVMRustGetDiagInfoKind(DI: &DiagnosticInfo) -> DiagnosticKind;
17281712

17291713
pub fn LLVMRustSetInlineAsmDiagnosticHandler(C: &Context,
17301714
H: InlineAsmDiagHandler,
17311715
CX: *mut c_void);
1732-
}
17331716

1734-
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
1735-
extern "C" {
1717+
#[allow(improper_ctypes)]
17361718
pub fn LLVMRustWriteSMDiagnosticToString(d: &SMDiagnostic, s: &RustString);
1737-
}
17381719

1739-
extern "C" {
17401720
pub fn LLVMRustWriteArchive(Dst: *const c_char,
17411721
NumMembers: size_t,
17421722
Members: *const &RustArchiveMember,

src/librustc_mir/build/matches/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
347347
span: test.span,
348348
ty: mty,
349349

350-
// FIXME(#47184): This constant comes from user
350+
// FIXME(#54571): This constant comes from user
351351
// input (a constant in a pattern). Are
352352
// there forms where users can add type
353353
// annotations here? For example, an

src/librustc_mir/hair/pattern/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl<'tcx> PatternTypeProjections<'tcx> {
8383
}
8484

8585
pub(crate) fn ref_binding(&self) -> Self {
86-
// FIXME(#47184): ignore for now
86+
// FIXME(#55401): ignore for now
8787
PatternTypeProjections { contents: vec![] }
8888
}
8989

src/librustdoc/clean/cfg.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
//! Representation of a `#[doc(cfg(...))]` attribute.
1212
13-
// FIXME: Once RFC #1868 is implemented, switch to use those structures instead.
13+
// FIXME: Once the portability lint RFC is implemented (see tracking issue #41619),
14+
// switch to use those structures instead.
1415

1516
use std::mem;
1617
use std::fmt::{self, Write};

src/librustdoc/html/render.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,10 +1240,8 @@ fn write_minify_replacer<W: Write>(dst: &mut W,
12401240
/// static HTML tree. Each component in the cleaned path will be passed as an
12411241
/// argument to `f`. The very last component of the path (ie the file name) will
12421242
/// be passed to `f` if `keep_filename` is true, and ignored otherwise.
1243-
// FIXME (#9639): The closure should deal with &[u8] instead of &str
1244-
// FIXME (#9639): This is too conservative, rejecting non-UTF-8 paths
12451243
fn clean_srcpath<F>(src_root: &Path, p: &Path, keep_filename: bool, mut f: F) where
1246-
F: FnMut(&str),
1244+
F: FnMut(&OsStr),
12471245
{
12481246
// make it relative, if possible
12491247
let p = p.strip_prefix(src_root).unwrap_or(p);
@@ -1256,8 +1254,8 @@ fn clean_srcpath<F>(src_root: &Path, p: &Path, keep_filename: bool, mut f: F) wh
12561254
}
12571255

12581256
match c {
1259-
Component::ParentDir => f("up"),
1260-
Component::Normal(c) => f(c.to_str().unwrap()),
1257+
Component::ParentDir => f("up".as_ref()),
1258+
Component::Normal(c) => f(c),
12611259
_ => continue,
12621260
}
12631261
}
@@ -1356,7 +1354,7 @@ impl<'a> SourceCollector<'a> {
13561354
cur.push(component);
13571355
fs::create_dir_all(&cur).unwrap();
13581356
root_path.push_str("../");
1359-
href.push_str(component);
1357+
href.push_str(&component.to_string_lossy());
13601358
href.push('/');
13611359
});
13621360
let mut fname = p.file_name()
@@ -2243,7 +2241,7 @@ impl<'a> Item<'a> {
22432241
};
22442242

22452243
clean_srcpath(&src_root, file, false, |component| {
2246-
path.push_str(component);
2244+
path.push_str(&component.to_string_lossy());
22472245
path.push('/');
22482246
});
22492247
let mut fname = file.file_name().expect("source has no filename")

src/test/auxiliary/rust_test_helpers.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,7 @@ rust_get_null_ptr() {
163163
return 0;
164164
}
165165

166-
/* Debug helpers strictly to verify ABI conformance.
167-
*
168-
* FIXME (#2665): move these into a testcase when the testsuite
169-
* understands how to have explicit C files included.
170-
*/
166+
// Debug helpers strictly to verify ABI conformance.
171167

172168
struct quad {
173169
uint64_t a;

src/test/run-pass/impl-trait/lifetimes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ impl<'a> SingleRegionTrait<'a> for &'a u32 {}
4141
struct SingleRegionStruct<'a>(&'a u32);
4242

4343
fn simple_type_hrtb<'b>() -> impl for<'a> SingleRegionTrait<'a> { 5 }
44-
// FIXME(cramertj) add test after #45992 lands to ensure lint is triggered
4544
fn elision_single_region_trait(x: &u32) -> impl SingleRegionTrait { x }
4645
fn elision_single_region_struct(x: SingleRegionStruct) -> impl Into<SingleRegionStruct> { x }
4746

src/test/run-pass/auxiliary/issue-31702-2.rs renamed to src/test/run-pass/issues/auxiliary/issue-31702-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::collections::HashMap;
1616
use issue_31702_1::U256;
1717

1818
pub struct Ethash {
19-
engine_params: for<'a> fn() -> Option<&'a Vec<u8>>,
19+
engine_params: fn() -> Option<&'static Vec<u8>>,
2020
u256_params: HashMap<String, U256>,
2121
}
2222

src/test/run-pass/issues/issue-31702.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
// run-pass
1212
// aux-build:issue-31702-1.rs
1313
// aux-build:issue-31702-2.rs
14-
// ignore-test: FIXME(#31702) when this test was added it was thought that the
15-
// accompanying llvm update would fix it, but
16-
// unfortunately it appears that was not the case. In
17-
// the interest of not deleting the test, though,
18-
// this is just tagged with ignore-test
1914

2015
// this test is actually entirely in the linked library crates
2116

0 commit comments

Comments
 (0)