Fix a typo in the ifmt dox

This commit is contained in:
Alex Crichton 2013-08-13 21:33:09 -07:00
parent 783c6a1fbf
commit 443bf93e48
3 changed files with 6 additions and 6 deletions

View file

@ -93,7 +93,7 @@ string.
Because formatting is done via traits, there is no requirement that the Because formatting is done via traits, there is no requirement that the
`d` format actually takes an `int`, but rather it simply requires a type which `d` format actually takes an `int`, but rather it simply requires a type which
ascribes to the `Signed` formatting trait. There are various parameters which do ascribes to the `Signed` formatting trait. There are various parameters which do
require a particular type, however. Namely if the sytnax `{:.*s}` is used, then require a particular type, however. Namely if the syntax `{:.*s}` is used, then
the number of characters to print from the string precedes the actual string and the number of characters to print from the string precedes the actual string and
must have the type `uint`. Although a `uint` can be printed with `{:u}`, it is must have the type `uint`. Although a `uint` can be printed with `{:u}`, it is
illegal to reference an argument as such. For example, this is another invalid illegal to reference an argument as such. For example, this is another invalid

View file

@ -13,7 +13,7 @@
// part of issue-6919.rs // part of issue-6919.rs
struct C<'self> { struct C<'self> {
pub k: &'self fn(), k: &'self fn(),
} }
fn no_op() { } fn no_op() { }

View file

@ -21,18 +21,18 @@ pub fn size_of_val<T>(val: &T) -> uint {
} }
pub trait TypeInfo { pub trait TypeInfo {
pub fn size_of() -> uint; fn size_of() -> uint;
pub fn size_of_val(&self) -> uint; fn size_of_val(&self) -> uint;
} }
impl<T> TypeInfo for T { impl<T> TypeInfo for T {
/// The size of the type in bytes. /// The size of the type in bytes.
pub fn size_of() -> uint { fn size_of() -> uint {
unsafe { intrinsics::size_of::<T>() } unsafe { intrinsics::size_of::<T>() }
} }
/// Returns the size of the type of `self` in bytes. /// Returns the size of the type of `self` in bytes.
pub fn size_of_val(&self) -> uint { fn size_of_val(&self) -> uint {
TypeInfo::size_of::<T>() TypeInfo::size_of::<T>()
} }
} }