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 12 pull requests #69986

Merged
merged 43 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
79b8ad8
Implement `Copy` for `IoSlice`
LeSeulArtichaut Feb 23, 2020
9fa7981
rustdoc: don't call into_iter() on iterator. (clippy::identity_conver…
matthiaskrgr Mar 5, 2020
6bfff8a
rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is…
matthiaskrgr Mar 5, 2020
7aad89a
Use ?-operator in more places (clippy::question_mark, had some false …
matthiaskrgr Mar 5, 2020
45108b1
rustdoc: simplify boolean condition (clippy::nonminimal_bool)
matthiaskrgr Mar 6, 2020
1351db3
iterate over a maps values directly. (clippy::for_kv_map)
matthiaskrgr Mar 6, 2020
254ceae
call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::opti…
matthiaskrgr Mar 6, 2020
0d7faaf
rustdoc: remove redundant static lifetimes (clippy::redundant_static_…
matthiaskrgr Mar 6, 2020
cca3d52
libtest: declare variables as floats instead of casting them (clippy:…
matthiaskrgr Mar 6, 2020
77af19e
remove unneeded mutable references (cippy::unnecessary_mut_passed)
matthiaskrgr Mar 6, 2020
f326f0f
libtest: remove redundant argument to writeln!() (clippy::writeln_emp…
matthiaskrgr Mar 6, 2020
3f87f8c
Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::w…
matthiaskrgr Mar 6, 2020
8351138
reduce references on match patterns (clippy::match_ref_pats)
matthiaskrgr Mar 7, 2020
611cfd5
Clean up E0423 explanation
GuillaumeGomez Mar 12, 2020
118003d
triagebot.toml: add ping aliases
Centril Mar 12, 2020
7326e53
Move some const-eval `build-pass` tests to `check-pass`
LeSeulArtichaut Mar 12, 2020
8f0fa24
Move some more tests to `check-pass`
LeSeulArtichaut Mar 12, 2020
90e8058
triagebot.toml: add typo aliases
Centril Mar 12, 2020
f32cccc
rename panic_if_ intrinsics to assert_
RalfJung Mar 12, 2020
7b1b08c
remove lifetimes that can be elided (clippy::needless_lifetimes)
matthiaskrgr Mar 6, 2020
e9c9657
miri engine: fix treatment of abort intrinsic
RalfJung Mar 12, 2020
081e32b
Add test for issue-58490
JohnTitor Mar 13, 2020
0efc2cf
Add test for issue-60390
JohnTitor Mar 13, 2020
a2c41e9
Add test for issue-62504
JohnTitor Mar 13, 2020
3609bac
Add test for issue-67739
JohnTitor Mar 13, 2020
7c987eb
Add test for issue-69092
JohnTitor Mar 13, 2020
f61fb53
adjust enum naming
RalfJung Mar 13, 2020
13ea774
bless tests
RalfJung Mar 13, 2020
08a7fa6
update stable-since version for const_int_conversion
tspiteri Mar 13, 2020
a36bf9c
Clean up E0434 explanation
GuillaumeGomez Mar 13, 2020
87f8ee6
Add documentation for pub keyword
sjud Mar 5, 2020
5d90154
Rollup merge of #69403 - LeSeulArtichaut:copy-ioslice, r=sfackler
JohnTitor Mar 13, 2020
913a933
Rollup merge of #69460 - LeSeulArtichaut:move-compile-pass, r=RalfJung
JohnTitor Mar 13, 2020
35df9cc
Rollup merge of #69723 - sjud:sjud-doc-request, r=Mark-Simulacrum
JohnTitor Mar 13, 2020
8e17c83
Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPC
JohnTitor Mar 13, 2020
c13548d
Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddyb
JohnTitor Mar 13, 2020
78d722f
Rollup merge of #69947 - GuillaumeGomez:cleanup-e0423, r=Dylan-DPC
JohnTitor Mar 13, 2020
995e584
Rollup merge of #69949 - rust-lang:triagebot-ping-alias, r=Mark-Simul…
JohnTitor Mar 13, 2020
77263db
Rollup merge of #69954 - RalfJung:panic_if-assert, r=Centril,eddyb
JohnTitor Mar 13, 2020
f2af2cf
Rollup merge of #69960 - RalfJung:abort, r=oli-obk
JohnTitor Mar 13, 2020
93da9d7
Rollup merge of #69966 - JohnTitor:more-more-tests, r=Centril
JohnTitor Mar 13, 2020
b0d1fc5
Rollup merge of #69973 - tspiteri:const-int-conversion-since, r=dtolnay
JohnTitor Mar 13, 2020
1d8f5f0
Rollup merge of #69974 - GuillaumeGomez:cleanup-e0434, r=Dylan-DPC
JohnTitor Mar 13, 2020
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 src/liballoc/collections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ impl<'a, T> CursorMut<'a, T> {
/// `CursorMut`, which means it cannot outlive the `CursorMut` and that the
/// `CursorMut` is frozen for the lifetime of the `Cursor`.
#[unstable(feature = "linked_list_cursors", issue = "58533")]
pub fn as_cursor<'cm>(&'cm self) -> Cursor<'cm, T> {
pub fn as_cursor(&self) -> Cursor<'_, T> {
Cursor { list: self.list, current: self.current, index: self.index }
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,17 +1005,23 @@ extern "rust-intrinsic" {

/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
/// This will statically either panic, or do nothing.
#[cfg(bootstrap)]
pub fn panic_if_uninhabited<T>();

/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
/// This will statically either panic, or do nothing.
#[cfg(not(bootstrap))]
pub fn assert_inhabited<T>();

/// A guard for unsafe functions that cannot ever be executed if `T` does not permit
/// zero-initialization: This will statically either panic, or do nothing.
#[cfg(not(bootstrap))]
pub fn panic_if_zero_invalid<T>();
pub fn assert_zero_valid<T>();

/// A guard for unsafe functions that cannot ever be executed if `T` has invalid
/// bit patterns: This will statically either panic, or do nothing.
#[cfg(not(bootstrap))]
pub fn panic_if_any_invalid<T>();
pub fn assert_uninit_valid<T>();

/// Gets a reference to a static `Location` indicating where it was called.
#[rustc_const_unstable(feature = "const_caller_location", issue = "47809")]
Expand Down
12 changes: 12 additions & 0 deletions src/libcore/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,10 @@ impl<T> MaybeUninit<T> {
#[inline(always)]
#[rustc_diagnostic_item = "assume_init"]
pub unsafe fn assume_init(self) -> T {
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
ManuallyDrop::into_inner(self.value)
}

Expand Down Expand Up @@ -559,7 +562,10 @@ impl<T> MaybeUninit<T> {
#[unstable(feature = "maybe_uninit_extra", issue = "63567")]
#[inline(always)]
pub unsafe fn read(&self) -> T {
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
self.as_ptr().read()
}

Expand Down Expand Up @@ -621,7 +627,10 @@ impl<T> MaybeUninit<T> {
#[unstable(feature = "maybe_uninit_ref", issue = "63568")]
#[inline(always)]
pub unsafe fn get_ref(&self) -> &T {
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
&*self.value
}

Expand Down Expand Up @@ -739,7 +748,10 @@ impl<T> MaybeUninit<T> {
#[unstable(feature = "maybe_uninit_ref", issue = "63568")]
#[inline(always)]
pub unsafe fn get_mut(&mut self) -> &mut T {
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
#[cfg(not(bootstrap))]
intrinsics::assert_inhabited::<T>();
&mut *self.value
}

Expand Down
4 changes: 2 additions & 2 deletions src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ pub const fn needs_drop<T>() -> bool {
#[rustc_diagnostic_item = "mem_zeroed"]
pub unsafe fn zeroed<T>() -> T {
#[cfg(not(bootstrap))]
intrinsics::panic_if_zero_invalid::<T>();
intrinsics::assert_zero_valid::<T>();
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
intrinsics::init()
Expand Down Expand Up @@ -533,7 +533,7 @@ pub unsafe fn zeroed<T>() -> T {
#[rustc_diagnostic_item = "mem_uninitialized"]
pub unsafe fn uninitialized<T>() -> T {
#[cfg(not(bootstrap))]
intrinsics::panic_if_any_invalid::<T>();
intrinsics::assert_uninit_valid::<T>();
#[cfg(bootstrap)]
intrinsics::panic_if_uninhabited::<T>();
intrinsics::uninit()
Expand Down
24 changes: 12 additions & 12 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,7 @@ let bytes = ", $swap_op, stringify!($SelfT), ".to_be_bytes();
assert_eq!(bytes, ", $be_bytes, ");
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_be().to_ne_bytes()
Expand All @@ -2174,7 +2174,7 @@ let bytes = ", $swap_op, stringify!($SelfT), ".to_le_bytes();
assert_eq!(bytes, ", $le_bytes, ");
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_le().to_ne_bytes()
Expand Down Expand Up @@ -2209,7 +2209,7 @@ assert_eq!(
);
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute them to arrays of bytes
#[allow_internal_unstable(const_fn_union)]
Expand Down Expand Up @@ -2251,7 +2251,7 @@ fn read_be_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
}
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_be(Self::from_ne_bytes(bytes))
Expand Down Expand Up @@ -2284,7 +2284,7 @@ fn read_le_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
}
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_le(Self::from_ne_bytes(bytes))
Expand Down Expand Up @@ -2327,7 +2327,7 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
}
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute to them
#[allow_internal_unstable(const_fn_union)]
Expand Down Expand Up @@ -4115,7 +4115,7 @@ let bytes = ", $swap_op, stringify!($SelfT), ".to_be_bytes();
assert_eq!(bytes, ", $be_bytes, ");
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_be().to_ne_bytes()
Expand All @@ -4135,7 +4135,7 @@ let bytes = ", $swap_op, stringify!($SelfT), ".to_le_bytes();
assert_eq!(bytes, ", $le_bytes, ");
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn to_le_bytes(self) -> [u8; mem::size_of::<Self>()] {
self.to_le().to_ne_bytes()
Expand Down Expand Up @@ -4170,7 +4170,7 @@ assert_eq!(
);
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute them to arrays of bytes
#[allow_internal_unstable(const_fn_union)]
Expand Down Expand Up @@ -4212,7 +4212,7 @@ fn read_be_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
}
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn from_be_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_be(Self::from_ne_bytes(bytes))
Expand Down Expand Up @@ -4245,7 +4245,7 @@ fn read_le_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
}
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
#[inline]
pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
Self::from_le(Self::from_ne_bytes(bytes))
Expand Down Expand Up @@ -4288,7 +4288,7 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
}
```"),
#[stable(feature = "int_to_from_bytes", since = "1.32.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.43.0")]
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
// SAFETY: const sound because integers are plain old datatypes so we can always
// transmute to them
#[allow_internal_unstable(const_fn_union)]
Expand Down
13 changes: 5 additions & 8 deletions src/libcore/str/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,7 @@ unsafe impl<'a> ReverseSearcher<'a> for CharSearcher<'a> {
let haystack = self.haystack.as_bytes();
loop {
// get the haystack up to but not including the last character searched
let bytes = if let Some(slice) = haystack.get(self.finger..self.finger_back) {
slice
} else {
return None;
};
let bytes = haystack.get(self.finger..self.finger_back)?;
// the last byte of the utf8 encoded needle
// SAFETY: we have an invariant that `utf8_size < 5`
let last_byte = unsafe { *self.utf8_encoded.get_unchecked(self.utf8_size - 1) };
Expand Down Expand Up @@ -575,11 +571,12 @@ macro_rules! pattern_methods {

#[inline]
fn is_suffix_of(self, haystack: &'a str) -> bool
where $t: ReverseSearcher<'a>
where
$t: ReverseSearcher<'a>,
{
($pmap)(self).is_suffix_of(haystack)
}
}
};
}

macro_rules! searcher_methods {
Expand Down Expand Up @@ -614,7 +611,7 @@ macro_rules! searcher_methods {
fn next_reject_back(&mut self) -> Option<(usize, usize)> {
self.0.next_reject_back()
}
}
};
}

/////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ macro_rules! define_dep_nodes {
$(
#[inline(always)]
#[allow(unreachable_code, non_snake_case)]
pub fn $variant<'tcx>(_tcx: TyCtxt<'tcx>, $(arg: $tuple_arg_ty)*) -> DepNode {
pub fn $variant(_tcx: TyCtxt<'_>, $(arg: $tuple_arg_ty)*) -> DepNode {
// tuple args
$({
erase!($tuple_arg_ty);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/map/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
/// deep walking so that we walk nested items in the context of
/// their outer items.

fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, Self::Map> {
fn nested_visit_map(&mut self) -> NestedVisitorMap<'_, Self::Map> {
panic!("`visit_nested_xxx` must be manually implemented in this visitor");
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/map/hir_id_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<'a, 'hir> HirIdValidator<'a, 'hir> {
impl<'a, 'hir> intravisit::Visitor<'hir> for HirIdValidator<'a, 'hir> {
type Map = Map<'hir>;

fn nested_visit_map<'this>(&'this mut self) -> intravisit::NestedVisitorMap<'this, Self::Map> {
fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<'_, Self::Map> {
intravisit::NestedVisitorMap::OnlyBodies(self.hir_map)
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl<'hir> Map<'hir> {
}

pub fn def_kind(&self, hir_id: HirId) -> Option<DefKind> {
let node = if let Some(node) = self.find(hir_id) { node } else { return None };
let node = self.find(hir_id)?;

Some(match node {
Node::Item(item) => match item.kind {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ pub enum ClearCrossCrate<T> {
}

impl<T> ClearCrossCrate<T> {
pub fn as_ref(&'a self) -> ClearCrossCrate<&'a T> {
pub fn as_ref(&self) -> ClearCrossCrate<&T> {
match self {
ClearCrossCrate::Clear => ClearCrossCrate::Clear,
ClearCrossCrate::Set(v) => ClearCrossCrate::Set(v),
Expand Down Expand Up @@ -2503,7 +2503,7 @@ impl UserTypeProjection {

pub(crate) fn variant(
mut self,
adt_def: &'tcx AdtDef,
adt_def: &AdtDef,
variant_index: VariantIdx,
field: Field,
) -> Self {
Expand Down
7 changes: 1 addition & 6 deletions src/librustc/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,7 @@ impl<'tcx> TyCtxt<'tcx> {
adt_did: DefId,
validate: &mut dyn FnMut(Self, DefId) -> Result<(), ErrorReported>,
) -> Option<ty::Destructor> {
let drop_trait = if let Some(def_id) = self.lang_items().drop_trait() {
def_id
} else {
return None;
};

let drop_trait = self.lang_items().drop_trait()?;
self.ensure().coherent_trait(drop_trait);

let mut dtor_did = None;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_codegen_llvm/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
}
}

pub fn val_ty(v: &'ll Value) -> &'ll Type {
pub fn val_ty(v: &Value) -> &Type {
unsafe { llvm::LLVMTypeOf(v) }
}

Expand All @@ -342,6 +342,6 @@ fn hi_lo_to_u128(lo: u64, hi: u64) -> u128 {
((hi as u128) << 64) | (lo as u128)
}

fn try_as_const_integral(v: &'ll Value) -> Option<&'ll ConstantInt> {
fn try_as_const_integral(v: &Value) -> Option<&ConstantInt> {
unsafe { llvm::LLVMIsAConstantInt(v) }
}
6 changes: 3 additions & 3 deletions src/librustc_codegen_llvm/llvm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ impl Drop for SectionIter<'a> {
}
}

pub fn mk_section_iter(llof: &'a ffi::ObjectFile) -> SectionIter<'a> {
pub fn mk_section_iter(llof: &ffi::ObjectFile) -> SectionIter<'_> {
unsafe { SectionIter { llsi: LLVMGetSections(llof) } }
}

/// Safe wrapper around `LLVMGetParam`, because segfaults are no fun.
pub fn get_param(llfn: &'a Value, index: c_uint) -> &'a Value {
pub fn get_param(llfn: &Value, index: c_uint) -> &Value {
unsafe {
assert!(
index < LLVMCountParams(llfn),
Expand All @@ -203,7 +203,7 @@ pub fn get_param(llfn: &'a Value, index: c_uint) -> &'a Value {
}

/// Safe wrapper for `LLVMGetValueName2` into a byte slice
pub fn get_value_name(value: &'a Value) -> &'a [u8] {
pub fn get_value_name(value: &Value) -> &[u8] {
unsafe {
let mut len = 0;
let data = LLVMGetValueName2(value, &mut len);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/type_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl Type {
unsafe { llvm::LLVMIntTypeInContext(llcx, num_bits as c_uint) }
}

pub fn i8p_llcx(llcx: &'ll llvm::Context) -> &'ll Type {
pub fn i8p_llcx(llcx: &llvm::Context) -> &Type {
Type::i8_llcx(llcx).ptr_to()
}

Expand Down
Loading