about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-06 03:56:22 +0000
committerbors <bors@rust-lang.org>2019-06-06 03:56:22 +0000
commit740668dbd99dbf1726bbb0cca6cd0943ea2f7e27 (patch)
tree7fcf783b5f92803e8ca4985eaa24097e76b6192c /src/libstd
parent1bec46c9a5399d5e95c05e3428c3abd264780705 (diff)
parentee890331f6e33afe12ef250eb6388db2aab7cbbf (diff)
downloadrust-740668dbd99dbf1726bbb0cca6cd0943ea2f7e27.tar.gz
rust-740668dbd99dbf1726bbb0cca6cd0943ea2f7e27.zip
Auto merge of #57428 - alexreg:associated_type_bounds, r=nikomatsakis,Centril
Implementation of RFC 2289 (associated_type_bounds)

This PR implements the [`asociated_type_bounds` feature](https://github.com/rust-lang/rfcs/blob/master/text/2289-associated-type-bounds.md).

Associated type bounds are implemented in:
   - function/method arguments and return types
   - structs, enums, unions
   - associated items in traits
   - type aliases
   - type parameter defaults
   - trait objects
   - let bindings

CC @nikomatsakis @centril
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/panicking.rs5
-rw-r--r--src/libstd/sys_common/backtrace.rs2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs
index 27b8a110ca7..9ef42063f94 100644
--- a/src/libstd/panicking.rs
+++ b/src/libstd/panicking.rs
@@ -171,7 +171,8 @@ fn default_hook(info: &PanicInfo<'_>) {
         }
     };
 
-    let location = info.location().unwrap();  // The current implementation always returns Some
+    // The current implementation always returns `Some`.
+    let location = info.location().unwrap();
 
     let msg = match info.payload().downcast_ref::<&'static str>() {
         Some(s) => *s,
@@ -196,7 +197,7 @@ fn default_hook(info: &PanicInfo<'_>) {
             if let Some(format) = log_backtrace {
                 let _ = backtrace::print(err, format);
             } else if FIRST_PANIC.compare_and_swap(true, false, Ordering::SeqCst) {
-                let _ = writeln!(err, "note: Run with `RUST_BACKTRACE=1` \
+                let _ = writeln!(err, "note: run with `RUST_BACKTRACE=1` \
                                        environment variable to display a backtrace.");
             }
         }
diff --git a/src/libstd/sys_common/backtrace.rs b/src/libstd/sys_common/backtrace.rs
index a01b31e948b..bf37ff7ddbd 100644
--- a/src/libstd/sys_common/backtrace.rs
+++ b/src/libstd/sys_common/backtrace.rs
@@ -173,7 +173,7 @@ impl<'a, 'b> Printer<'a, 'b> {
             Some(symbol) => {
                 match self.format {
                     PrintFormat::Full => write!(self.out, "{}", symbol)?,
-                    // strip the trailing hash if short mode
+                    // Strip the trailing hash if short mode.
                     PrintFormat::Short => write!(self.out, "{:#}", symbol)?,
                 }
             }