Auto merge of #56962 - nivkner:fixme_fixup4, r=pnkfelix

address some FIXME whose associated issues were marked as closed

part of #44366
This commit is contained in:
bors 2018-12-25 13:32:31 +00:00
commit 27a25df2e2
25 changed files with 54 additions and 94 deletions

View File

@ -1601,15 +1601,12 @@ extern "C" {
-> &'a Value;
pub fn LLVMRustDIBuilderCreateOpDeref() -> i64;
pub fn LLVMRustDIBuilderCreateOpPlusUconst() -> i64;
}
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
extern "C" {
#[allow(improper_ctypes)]
pub fn LLVMRustWriteTypeToString(Type: &Type, s: &RustString);
#[allow(improper_ctypes)]
pub fn LLVMRustWriteValueToString(value_ref: &Value, s: &RustString);
}
extern "C" {
pub fn LLVMIsAConstantInt(value_ref: &Value) -> Option<&Value>;
pub fn LLVMIsAConstantFP(value_ref: &Value) -> Option<&Value>;
@ -1687,21 +1684,15 @@ extern "C" {
pub fn LLVMRustDestroyArchive(AR: &'static mut Archive);
pub fn LLVMRustGetSectionName(SI: &SectionIterator, data: &mut *const c_char) -> size_t;
}
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
extern "C" {
#[allow(improper_ctypes)]
pub fn LLVMRustWriteTwineToString(T: &Twine, s: &RustString);
}
extern "C" {
pub fn LLVMContextSetDiagnosticHandler(C: &Context,
Handler: DiagnosticHandler,
DiagnosticContext: *mut c_void);
}
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
extern "C" {
#[allow(improper_ctypes)]
pub fn LLVMRustUnpackOptimizationDiagnostic(DI: &'a DiagnosticInfo,
pass_name_out: &RustString,
function_out: &mut Option<&'a Value>,
@ -1709,34 +1700,23 @@ extern "C" {
loc_column_out: &mut c_uint,
loc_filename_out: &RustString,
message_out: &RustString);
}
extern "C" {
pub fn LLVMRustUnpackInlineAsmDiagnostic(DI: &'a DiagnosticInfo,
cookie_out: &mut c_uint,
message_out: &mut Option<&'a Twine>,
instruction_out: &mut Option<&'a Value>);
}
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
extern "C" {
#[allow(improper_ctypes)]
pub fn LLVMRustWriteDiagnosticInfoToString(DI: &DiagnosticInfo, s: &RustString);
}
extern "C" {
pub fn LLVMRustGetDiagInfoKind(DI: &DiagnosticInfo) -> DiagnosticKind;
pub fn LLVMRustSetInlineAsmDiagnosticHandler(C: &Context,
H: InlineAsmDiagHandler,
CX: *mut c_void);
}
#[allow(improper_ctypes)] // FIXME(#52456) needed for RustString.
extern "C" {
#[allow(improper_ctypes)]
pub fn LLVMRustWriteSMDiagnosticToString(d: &SMDiagnostic, s: &RustString);
}
extern "C" {
pub fn LLVMRustWriteArchive(Dst: *const c_char,
NumMembers: size_t,
Members: *const &RustArchiveMember,

View File

@ -347,7 +347,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
span: test.span,
ty: mty,
// FIXME(#47184): This constant comes from user
// FIXME(#54571): This constant comes from user
// input (a constant in a pattern). Are
// there forms where users can add type
// annotations here? For example, an

View File

@ -83,7 +83,7 @@ impl<'tcx> PatternTypeProjections<'tcx> {
}
pub(crate) fn ref_binding(&self) -> Self {
// FIXME(#47184): ignore for now
// FIXME(#55401): ignore for now
PatternTypeProjections { contents: vec![] }
}

View File

@ -10,7 +10,8 @@
//! Representation of a `#[doc(cfg(...))]` attribute.
// FIXME: Once RFC #1868 is implemented, switch to use those structures instead.
// FIXME: Once the portability lint RFC is implemented (see tracking issue #41619),
// switch to use those structures instead.
use std::mem;
use std::fmt::{self, Write};

View File

@ -1240,10 +1240,8 @@ fn write_minify_replacer<W: Write>(dst: &mut W,
/// static HTML tree. Each component in the cleaned path will be passed as an
/// argument to `f`. The very last component of the path (ie the file name) will
/// be passed to `f` if `keep_filename` is true, and ignored otherwise.
// FIXME (#9639): The closure should deal with &[u8] instead of &str
// FIXME (#9639): This is too conservative, rejecting non-UTF-8 paths
fn clean_srcpath<F>(src_root: &Path, p: &Path, keep_filename: bool, mut f: F) where
F: FnMut(&str),
F: FnMut(&OsStr),
{
// make it relative, if possible
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
}
match c {
Component::ParentDir => f("up"),
Component::Normal(c) => f(c.to_str().unwrap()),
Component::ParentDir => f("up".as_ref()),
Component::Normal(c) => f(c),
_ => continue,
}
}
@ -1356,7 +1354,7 @@ impl<'a> SourceCollector<'a> {
cur.push(component);
fs::create_dir_all(&cur).unwrap();
root_path.push_str("../");
href.push_str(component);
href.push_str(&component.to_string_lossy());
href.push('/');
});
let mut fname = p.file_name()
@ -2243,7 +2241,7 @@ impl<'a> Item<'a> {
};
clean_srcpath(&src_root, file, false, |component| {
path.push_str(component);
path.push_str(&component.to_string_lossy());
path.push('/');
});
let mut fname = file.file_name().expect("source has no filename")

View File

@ -163,11 +163,7 @@ rust_get_null_ptr() {
return 0;
}
/* Debug helpers strictly to verify ABI conformance.
*
* FIXME (#2665): move these into a testcase when the testsuite
* understands how to have explicit C files included.
*/
// Debug helpers strictly to verify ABI conformance.
struct quad {
uint64_t a;

View File

@ -41,7 +41,6 @@ impl<'a> SingleRegionTrait<'a> for &'a u32 {}
struct SingleRegionStruct<'a>(&'a u32);
fn simple_type_hrtb<'b>() -> impl for<'a> SingleRegionTrait<'a> { 5 }
// FIXME(cramertj) add test after #45992 lands to ensure lint is triggered
fn elision_single_region_trait(x: &u32) -> impl SingleRegionTrait { x }
fn elision_single_region_struct(x: SingleRegionStruct) -> impl Into<SingleRegionStruct> { x }

View File

@ -16,7 +16,7 @@ use std::collections::HashMap;
use issue_31702_1::U256;
pub struct Ethash {
engine_params: for<'a> fn() -> Option<&'a Vec<u8>>,
engine_params: fn() -> Option<&'static Vec<u8>>,
u256_params: HashMap<String, U256>,
}

View File

@ -11,11 +11,6 @@
// run-pass
// aux-build:issue-31702-1.rs
// aux-build:issue-31702-2.rs
// ignore-test: FIXME(#31702) when this test was added it was thought that the
// accompanying llvm update would fix it, but
// unfortunately it appears that was not the case. In
// the interest of not deleting the test, though,
// this is just tagged with ignore-test
// this test is actually entirely in the linked library crates

View File

@ -12,7 +12,7 @@
// var, but we do not permit you to use the complete var afterwards.
// We hope to fix this at some point.
//
// FIXME(#21232)
// FIXME(#54987)
fn assign_both_fields_and_use() {
let mut x: (u32, u32);

View File

@ -10,7 +10,7 @@ LL | *y = 1;
| ------ first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-describe-lvalue.rs:307:20
--> $DIR/borrowck-describe-lvalue.rs:306:20
|
LL | let y = &mut x;
| ------ first mutable borrow occurs here
@ -21,7 +21,7 @@ LL | *y = 1;
| ------ first borrow later used here
error: captured variable cannot escape `FnMut` closure body
--> $DIR/borrowck-describe-lvalue.rs:305:16
--> $DIR/borrowck-describe-lvalue.rs:304:16
|
LL | || {
| - inferred to be a `FnMut` closure
@ -368,7 +368,7 @@ LL | drop(x);
= warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
error[E0382]: use of moved value: `x`
--> $DIR/borrowck-describe-lvalue.rs:318:22
--> $DIR/borrowck-describe-lvalue.rs:317:22
|
LL | drop(x);
| - value moved here

View File

@ -220,7 +220,7 @@ LL | };
| - first borrow ends here
error[E0499]: cannot borrow `**x` as mutable more than once at a time
--> $DIR/borrowck-describe-lvalue.rs:307:25
--> $DIR/borrowck-describe-lvalue.rs:306:25
|
LL | let y = &mut x;
| - first mutable borrow occurs here
@ -231,7 +231,7 @@ LL | }
| - first borrow ends here
error[E0382]: use of moved value: `x`
--> $DIR/borrowck-describe-lvalue.rs:318:22
--> $DIR/borrowck-describe-lvalue.rs:317:22
|
LL | drop(x);
| - value moved here

View File

@ -10,7 +10,7 @@ LL | *y = 1;
| ------ first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-describe-lvalue.rs:307:20
--> $DIR/borrowck-describe-lvalue.rs:306:20
|
LL | let y = &mut x;
| ------ first mutable borrow occurs here
@ -21,7 +21,7 @@ LL | *y = 1;
| ------ first borrow later used here
error: captured variable cannot escape `FnMut` closure body
--> $DIR/borrowck-describe-lvalue.rs:305:16
--> $DIR/borrowck-describe-lvalue.rs:304:16
|
LL | || {
| - inferred to be a `FnMut` closure
@ -362,7 +362,7 @@ LL | drop(x);
| - mutable borrow later used here
error[E0382]: use of moved value: `x`
--> $DIR/borrowck-describe-lvalue.rs:318:22
--> $DIR/borrowck-describe-lvalue.rs:317:22
|
LL | drop(x);
| - value moved here

View File

@ -299,7 +299,6 @@ fn main() {
}
// Field from upvar nested
{
// FIXME(#49824) -- the free region error below should probably not be there
let mut x = 0;
|| {
|| { //[mir]~ ERROR captured variable cannot escape `FnMut` closure body

View File

@ -1,5 +1,5 @@
error[E0716]: temporary value dropped while borrowed
--> $DIR/issue-36082.rs:23:19
--> $DIR/issue-36082.rs:21:19
|
LL | let val: &_ = x.borrow().0;
| ^^^^^^^^^^ - temporary value is freed at the end of this statement

View File

@ -1,5 +1,5 @@
error[E0597]: borrowed value does not live long enough
--> $DIR/issue-36082.rs:23:19
--> $DIR/issue-36082.rs:21:19
|
LL | let val: &_ = x.borrow().0;
| ^^^^^^^^^^ - temporary value dropped here while still borrowed

View File

@ -1,5 +1,5 @@
error[E0716]: temporary value dropped while borrowed
--> $DIR/issue-36082.rs:23:19
--> $DIR/issue-36082.rs:21:19
|
LL | let val: &_ = x.borrow().0;
| ^^^^^^^^^^ - temporary value is freed at the end of this statement

View File

@ -11,8 +11,6 @@
// revisions: ast mir
//[mir]compile-flags: -Z borrowck=mir
// FIXME(#49821) -- No tip about using a let binding
use std::cell::RefCell;
fn main() {

View File

@ -12,9 +12,6 @@
// approximate the shorter end-point (`'y`) to with `'static`. This is
// because `'y` is higher-ranked but we know of no relations to other
// regions. Note that `'static` shows up in the stderr output as `'0`.
//
// FIXME(#45827) Because of shortcomings in the MIR type checker,
// these errors are not (yet) reported.
// compile-flags:-Zborrowck=mir -Zverbose

View File

@ -1,5 +1,5 @@
note: External requirements
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:42:47
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
| _______________________________________________^
@ -20,7 +20,7 @@ LL | | });
= note: where '_#1r: '_#0r
note: No external requirements
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:41:1
|
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
@ -34,7 +34,7 @@ LL | | }
= note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []
error[E0521]: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:5
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:42:5
|
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
| ------ `cell_a` is a reference that is only valid in the function body

View File

@ -13,9 +13,6 @@
// because `'y` is higher-ranked but we know of only irrelevant
// relations to other regions. Note that `'static` shows up in the
// stderr output as `'0`.
//
// FIXME(#45827) Because of shortcomings in the MIR type checker,
// these errors are not (yet) reported.
// compile-flags:-Zborrowck=mir -Zverbose

View File

@ -1,5 +1,5 @@
note: External requirements
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:45:47
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
| _______________________________________________^
@ -20,7 +20,7 @@ LL | | });
= note: where '_#1r: '_#0r
note: No external requirements
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:44:1
|
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
@ -34,7 +34,7 @@ LL | | }
= note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []
error[E0521]: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:45:5
|
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
| ------ `cell_a` is a reference that is only valid in the function body

View File

@ -27,7 +27,7 @@ use util::{logv, PathBufExt};
use std::collections::hash_map::DefaultHasher;
use std::collections::{HashMap, HashSet, VecDeque};
use std::env;
use std::ffi::OsString;
use std::ffi::{OsStr, OsString};
use std::fmt;
use std::fs::{self, create_dir_all, File};
use std::hash::{Hash, Hasher};
@ -763,13 +763,13 @@ impl<'test> TestCx<'test> {
}
drop(stdout);
let debugger_script = self.make_out_name("debugger.script");
// FIXME (#9639): This needs to handle non-utf8 paths
let debugger_opts = vec![
"-quiet".to_owned(),
"-batch".to_owned(),
"-nx".to_owned(),
format!("-command={}", debugger_script.to_str().unwrap()),
let mut debugger_script = OsString::from("-command=");
debugger_script.push(self.make_out_name("debugger.script"));
let debugger_opts: &[&OsStr] = &[
"-quiet".as_ref(),
"-batch".as_ref(),
"-nx".as_ref(),
&debugger_script,
];
let gdb_path = self.config.gdb.as_ref().unwrap();
@ -778,12 +778,12 @@ impl<'test> TestCx<'test> {
stdout,
stderr,
} = Command::new(&gdb_path)
.args(&debugger_opts)
.args(debugger_opts)
.output()
.expect(&format!("failed to exec `{:?}`", gdb_path));
let cmdline = {
let mut gdb = Command::new(&format!("{}-gdb", self.config.target));
gdb.args(&debugger_opts);
gdb.args(debugger_opts);
let cmdline = self.make_cmdline(&gdb, "");
logv(self.config, format!("executing {}", cmdline));
cmdline
@ -871,18 +871,18 @@ impl<'test> TestCx<'test> {
debug!("script_str = {}", script_str);
self.dump_output_file(&script_str, "debugger.script");
let debugger_script = self.make_out_name("debugger.script");
let mut debugger_script = OsString::from("-command=");
debugger_script.push(self.make_out_name("debugger.script"));
// FIXME (#9639): This needs to handle non-utf8 paths
let debugger_opts = vec![
"-quiet".to_owned(),
"-batch".to_owned(),
"-nx".to_owned(),
format!("-command={}", debugger_script.to_str().unwrap()),
let debugger_opts: &[&OsStr] = &[
"-quiet".as_ref(),
"-batch".as_ref(),
"-nx".as_ref(),
&debugger_script,
];
let mut gdb = Command::new(self.config.gdb.as_ref().unwrap());
gdb.args(&debugger_opts)
gdb.args(debugger_opts)
.env("PYTHONPATH", rust_pp_module_abs_path);
debugger_run_result = self.compose_and_run(

View File

@ -58,7 +58,7 @@ const EXCEPTION_PATHS: &[&str] = &[
"src/rtstartup", // Not sure what to do about this. magic stuff for mingw
// temporary exceptions
"src/libstd/lib.rs", // FIXME(#44217)
"src/libstd/lib.rs",
"src/libstd/path.rs",
"src/libstd/f32.rs",
"src/libstd/f64.rs",