# `non_ascii_idents`
-The tracking issue for this feature is: [#28979]
+The tracking issue for this feature is: [#55467]
-[#28979]: https://github.com/rust-lang/rust/issues/28979
+[#55467]: https://github.com/rust-lang/rust/issues/55467
------------------------
//! values.
//!
//! However, these restrictions are usually not necessary. Many types are always freely
-//! movable. These types implement the [`Unpin`] auto-trait, which nullifies the affect
+//! movable. These types implement the [`Unpin`] auto-trait, which nullifies the effect
//! of [`Pin`]. For `T: Unpin`, `Pin<Box<T>>` and `Box<T>` function identically, as do
//! `Pin<&mut T>` and `&mut T`.
//!
/// whether `T` is [`Copy`]. If `T` is not [`Copy`], using both the returned
/// value and the value at `*src` can [violate memory safety][read-ownership].
///
-/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
+/// Note that even if `T` has size `0`, the pointer must be non-NULL.
///
/// [`Copy`]: ../marker/trait.Copy.html
/// [`read`]: ./fn.read.html
///
/// * `dst` must be [valid] for writes.
///
-/// Note that even if `T` has size `0`, the pointer must be non-NULL and properly aligned.
+/// Note that even if `T` has size `0`, the pointer must be non-NULL.
///
/// [valid]: ../ptr/index.html#safety
///
/// `Some(raw count)` when the string is "raw", used to position spans correctly
style: Option<usize>,
/// Start and end byte offset of every successfully parsed argument
- pub arg_places: Vec<(usize, usize)>,
+ pub arg_places: Vec<(SpanIndex, SpanIndex)>,
/// Characters that need to be shifted
skips: Vec<usize>,
/// Span offset of the last opening brace seen, used for error reporting
}
#[derive(Clone, Copy, Debug)]
-pub struct SpanIndex(usize);
+pub struct SpanIndex(pub usize);
impl SpanIndex {
pub fn unwrap(self) -> usize {
type Item = Piece<'a>;
fn next(&mut self) -> Option<Piece<'a>> {
- let raw = self.raw();
if let Some(&(pos, c)) = self.cur.peek() {
match c {
'{' => {
} else {
let arg = self.argument();
if let Some(arg_pos) = self.must_consume('}').map(|end| {
- (pos + raw + 1, end + raw + 2)
+ (self.to_span_index(pos), self.to_span_index(end + 1))
}) {
self.arg_places.push(arg_pos);
}
"emit Retagging MIR statements, interpreted e.g., by miri; implies -Zmir-opt-level=0"),
perf_stats: bool = (false, parse_bool, [UNTRACKED],
"print some performance-related statistics"),
+ query_stats: bool = (false, parse_bool, [UNTRACKED],
+ "print some statistics about the query system"),
hir_stats: bool = (false, parse_bool, [UNTRACKED],
"print some statistics about AST and HIR"),
always_encode_mir: bool = (false, parse_bool, [TRACKED],
/// as well as all upstream crates. Only populated in incremental mode.
pub def_path_hash_to_def_id: Option<FxHashMap<DefPathHash, DefId>>,
- pub(crate) queries: query::Queries<'tcx>,
+ pub queries: query::Queries<'tcx>,
// Records the free variables referenced by every closure
// expression. Do not track deps for this, just recompute it from
use std::borrow::Cow;
use std::ops::Deref;
use std::sync::Arc;
+use std::intrinsics::type_name;
use syntax_pos::{Span, DUMMY_SP};
use syntax_pos::symbol::InternedString;
use syntax::attr;
pub struct QueryCache<'tcx, D: QueryConfig<'tcx> + ?Sized> {
pub(super) results: FxHashMap<D::Key, QueryValue<D::Value>>,
pub(super) active: FxHashMap<D::Key, QueryResult<'tcx>>,
+ #[cfg(debug_assertions)]
+ pub(super) cache_hits: usize,
}
pub(super) struct QueryValue<T> {
QueryCache {
results: FxHashMap::default(),
active: FxHashMap::default(),
+ #[cfg(debug_assertions)]
+ cache_hits: 0,
}
}
}
});
let result = Ok((value.value.clone(), value.index));
+ #[cfg(debug_assertions)]
+ {
+ lock.cache_hits += 1;
+ }
return TryGetJob::JobCompleted(result);
}
let job = match lock.active.entry((*key).clone()) {
jobs
}
+
+ pub fn print_stats(&self) {
+ let mut queries = Vec::new();
+
+ #[derive(Clone)]
+ struct QueryStats {
+ name: &'static str,
+ cache_hits: usize,
+ key_size: usize,
+ key_type: &'static str,
+ value_size: usize,
+ value_type: &'static str,
+ entry_count: usize,
+ }
+
+ fn stats<'tcx, Q: QueryConfig<'tcx>>(
+ name: &'static str,
+ map: &QueryCache<'tcx, Q>
+ ) -> QueryStats {
+ QueryStats {
+ name,
+ #[cfg(debug_assertions)]
+ cache_hits: map.cache_hits,
+ #[cfg(not(debug_assertions))]
+ cache_hits: 0,
+ key_size: mem::size_of::<Q::Key>(),
+ key_type: unsafe { type_name::<Q::Key>() },
+ value_size: mem::size_of::<Q::Value>(),
+ value_type: unsafe { type_name::<Q::Value>() },
+ entry_count: map.results.len(),
+ }
+ }
+
+ $(
+ queries.push(stats::<queries::$name<'_>>(
+ stringify!($name),
+ &*self.$name.lock()
+ ));
+ )*
+
+ if cfg!(debug_assertions) {
+ let hits: usize = queries.iter().map(|s| s.cache_hits).sum();
+ let results: usize = queries.iter().map(|s| s.entry_count).sum();
+ println!("\nQuery cache hit rate: {}", hits as f64 / (hits + results) as f64);
+ }
+
+ let mut query_key_sizes = queries.clone();
+ query_key_sizes.sort_by_key(|q| q.key_size);
+ println!("\nLarge query keys:");
+ for q in query_key_sizes.iter().rev()
+ .filter(|q| q.key_size > 8) {
+ println!(
+ " {} - {} x {} - {}",
+ q.name,
+ q.key_size,
+ q.entry_count,
+ q.key_type
+ );
+ }
+
+ let mut query_value_sizes = queries.clone();
+ query_value_sizes.sort_by_key(|q| q.value_size);
+ println!("\nLarge query values:");
+ for q in query_value_sizes.iter().rev()
+ .filter(|q| q.value_size > 8) {
+ println!(
+ " {} - {} x {} - {}",
+ q.name,
+ q.value_size,
+ q.entry_count,
+ q.value_type
+ );
+ }
+
+ if cfg!(debug_assertions) {
+ let mut query_cache_hits = queries.clone();
+ query_cache_hits.sort_by_key(|q| q.cache_hits);
+ println!("\nQuery cache hits:");
+ for q in query_cache_hits.iter().rev() {
+ println!(
+ " {} - {} ({}%)",
+ q.name,
+ q.cache_hits,
+ q.cache_hits as f64 / (q.cache_hits + q.entry_count) as f64
+ );
+ }
+ }
+
+ let mut query_value_count = queries.clone();
+ query_value_count.sort_by_key(|q| q.entry_count);
+ println!("\nQuery value count:");
+ for q in query_value_count.iter().rev() {
+ println!(" {} - {}", q.name, q.entry_count);
+ }
+ }
}
#[allow(nonstandard_style)]
macro_rules! define_queries_struct {
(tcx: $tcx:tt,
input: ($(([$($modifiers:tt)*] [$($attr:tt)*] [$name:ident]))*)) => {
- pub(crate) struct Queries<$tcx> {
+ pub struct Queries<$tcx> {
/// This provides access to the incr. comp. on-disk cache for query results.
/// Do not access this directly. It is only meant to be used by
/// `DepGraph::try_mark_green()` and the query infrastructure.
> WARNING: This README is more or less obsolete, and will be removed
> soon! The new system is described in the [rustc guide].
-[rustc guide]: https://rust-lang.github.io/rustc-guide/mir/borrowck.html
+[rustc guide]: https://rust-lang.github.io/rustc-guide/borrow_check.html
This pass has the job of enforcing memory safety. This is a subtle
topic. This docs aim to explain both the practice and the theory
}
}
+ if tcx.sess.opts.debugging_opts.query_stats {
+ tcx.queries.print_stats();
+ }
+
Ok((outputs.clone(), ongoing_codegen, tcx.dep_graph.clone()))
},
)??
/// If present, playground URL to use in the "Run" button added to code samples generated from
/// standalone Markdown files. If not present, `playground_url` is used.
pub markdown_playground_url: Option<String>,
+ /// If false, the `select` element to have search filtering by crates on rendered docs
+ /// won't be generated.
+ pub generate_search_filter: bool,
}
impl Options {
let crate_version = matches.opt_str("crate-version");
let enable_index_page = matches.opt_present("enable-index-page") || index_page.is_some();
let static_root_path = matches.opt_str("static-root-path");
+ let generate_search_filter = !matches.opt_present("disable-per-crate-search");
let (lint_opts, describe_lints, lint_cap) = get_cmd_lint_options(matches, error_format);
markdown_no_toc,
markdown_css,
markdown_playground_url,
+ generate_search_filter,
}
})
}
}
pub fn render<T: fmt::Display, S: fmt::Display>(
- dst: &mut dyn io::Write, layout: &Layout, page: &Page, sidebar: &S, t: &T,
- css_file_extension: bool, themes: &[PathBuf])
- -> io::Result<()>
-{
+ dst: &mut dyn io::Write,
+ layout: &Layout,
+ page: &Page,
+ sidebar: &S,
+ t: &T,
+ css_file_extension: bool,
+ themes: &[PathBuf],
+ generate_search_filter: bool,
+) -> io::Result<()> {
let static_root_path = page.static_root_path.unwrap_or(page.root_path);
write!(dst,
"<!DOCTYPE html>\
<nav class=\"sub\">\
<form class=\"search-form js-only\">\
<div class=\"search-container\">\
- <div>\
- <select id=\"crate-search\">\
- <option value=\"All crates\">All crates</option>\
- </select>\
+ <div>{filter_crates}\
<input class=\"search-input\" name=\"search\" \
autocomplete=\"off\" \
spellcheck=\"false\" \
root_path=page.root_path,
extra_script=e)
}).collect::<String>(),
+ filter_crates=if generate_search_filter {
+ "<select id=\"crate-search\">\
+ <option value=\"All crates\">All crates</option>\
+ </select>"
+ } else {
+ ""
+ },
)
}
/// Optional path string to be used to load static files on output pages. If not set, uses
/// combinations of `../` to reach the documentation root.
pub static_root_path: Option<String>,
+ /// If false, the `select` element to have search filtering by crates on rendered docs
+ /// won't be generated.
+ pub generate_search_filter: bool,
}
impl SharedContext {
extern_html_root_urls,
resource_suffix,
static_root_path,
+ generate_search_filter,
..
} = options;
themes,
resource_suffix,
static_root_path,
+ generate_search_filter,
};
// If user passed in `--playground-url` arg, we fill in crate name here
try_err!(layout::render(&mut w, &cx.shared.layout,
&page, &(""), &content,
cx.shared.css_file_extension.is_some(),
- &cx.shared.themes), &dst);
+ &cx.shared.themes,
+ cx.shared.generate_search_filter), &dst);
try_err!(w.flush(), &dst);
}
}
layout::render(&mut w, &self.scx.layout,
&page, &(""), &Source(contents),
self.scx.css_file_extension.is_some(),
- &self.scx.themes)?;
+ &self.scx.themes,
+ self.scx.generate_search_filter)?;
w.flush()?;
self.scx.local_sources.insert(p.clone(), href);
Ok(())
try_err!(layout::render(&mut w, &self.shared.layout,
&page, &sidebar, &all,
self.shared.css_file_extension.is_some(),
- &self.shared.themes),
+ &self.shared.themes,
+ self.shared.generate_search_filter),
&final_file);
// Generating settings page.
try_err!(layout::render(&mut w, &layout,
&page, &sidebar, &settings,
self.shared.css_file_extension.is_some(),
- &themes),
+ &themes,
+ self.shared.generate_search_filter),
&settings_file);
Ok(())
&Sidebar{ cx: self, item: it },
&Item{ cx: self, item: it },
self.shared.css_file_extension.is_some(),
- &self.shared.themes)?;
+ &self.shared.themes,
+ self.shared.generate_search_filter)?;
} else {
let mut url = self.root_path();
if let Some(&(ref names, ty)) = cache().paths.get(&it.def_id) {
-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="128px" id="Layer_1" style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" width="128px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><line style="fill:none;stroke:#2F3435;stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="111" x2="64" y1="40.5" y2="87.499"/><line style="fill:none;stroke:#2F3435;stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="64" x2="17" y1="87.499" y2="40.5"/></g></svg>
\ No newline at end of file
+<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="128px" id="Layer_1" style="enable-background:new 0 0 128 128;" version="1.1" viewBox="-30 -20 176 176" width="128px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><line style="fill:none;stroke:#2F3435;stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="111" x2="64" y1="40.5" y2="87.499"/><line style="fill:none;stroke:#2F3435;stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="64" x2="17" y1="87.499" y2="40.5"/></g></svg>
\ No newline at end of file
return;
}
var crates_text = [];
- for (var crate in crates) {
- if (crates.hasOwnProperty(crate)) {
- crates_text.push(crate);
+ if (crates.length > 1) {
+ for (var crate in crates) {
+ if (crates.hasOwnProperty(crate)) {
+ crates_text.push(crate);
+ }
}
}
crates_text.sort(function(a, b) {
box-sizing: border-box !important;
outline: none;
border: none;
- border-radius: 0 1px 1px 0;
+ border-radius: 1px;
margin-top: 5px;
padding: 10px 16px;
font-size: 17px;
width: 100%;
}
+#crate-search + .search-input {
+ border-radius: 0 1px 1px 0;
+}
+
.search-input:focus {
border-radius: 2px;
border: 0;
.search-input {
color: #111;
- box-shadow: 1px 0 0 1px #000, 0 0 0 2px transparent;
+ box-shadow: 0 0 0 1px #000, 0 0 0 2px transparent;
background-color: #f0f0f0;
}
border-color: #008dfd;
}
+#crate-search + .search-input {
+ box-shadow: 1px 0 0 1px #000, 0 0 0 2px transparent;
+}
+
.stab.unstable { background: #FFF5D6; border-color: #FFC600; color: #404040; }
.stab.internal { background: #FFB9B3; border-color: #B71C1C; color: #404040; }
.stab.deprecated { background: #F3DFFF; border-color: #7F0087; color: #404040; }
.search-input {
color: #555;
- box-shadow: 1px 0 0 1px #e0e0e0, 0 0 0 2px transparent;
+ box-shadow: 0 0 0 1px #e0e0e0, 0 0 0 2px transparent;
background-color: white;
}
border-color: #66afe9;
}
+#crate-search + .search-input {
+ box-shadow: 1px 0 0 1px #e0e0e0, 0 0 0 2px transparent;
+}
+
.stab.unstable { background: #FFF5D6; border-color: #FFC600; }
.stab.internal { background: #FFB9B3; border-color: #B71C1C; }
.stab.deprecated { background: #F3DFFF; border-color: #7F0087; }
If not set, uses combinations of '../' to reach the documentation root.",
"PATH")
}),
+ unstable("disable-per-crate-search", |o| {
+ o.optflag("",
+ "disable-per-crate-search",
+ "disables generating the crate selector on the search box")
+ }),
]
}
/// ```text
/// error: character literal may only contain one codepoint: 'é'
/// let c = 'é';
-/// ^^^^
+/// ^^^
/// ```
///
/// Another implication of the 4-byte fixed size of a `char` is that
(active, concat_idents, "1.0.0", Some(29599), None),
(active, link_args, "1.0.0", Some(29596), None),
(active, log_syntax, "1.0.0", Some(29598), None),
- (active, non_ascii_idents, "1.0.0", Some(28979), None),
+ (active, non_ascii_idents, "1.0.0", Some(55467), None),
(active, plugin_registrar, "1.0.0", Some(29597), None),
(active, thread_local, "1.0.0", Some(29594), None),
(active, trace_macros, "1.0.0", Some(29598), None),
}
let arg_spans = parser.arg_places.iter()
- .map(|&(start, end)| fmt.span.from_inner_byte_pos(start, end))
+ .map(|&(parse::SpanIndex(start), parse::SpanIndex(end))| {
+ fmt.span.from_inner_byte_pos(start, end)
+ })
.collect();
let mut cx = Context {
let mut diag = {
if errs_len == 1 {
let (sp, msg) = errs.into_iter().next().unwrap();
- cx.ecx.struct_span_err(sp, msg)
+ let mut diag = cx.ecx.struct_span_err(sp, msg);
+ diag.span_label(sp, msg);
+ diag
} else {
let mut diag = cx.ecx.struct_span_err(
errs.iter().map(|&(sp, _)| sp).collect::<Vec<Span>>(),
"multiple unused formatting arguments",
);
diag.span_label(cx.fmtsp, "multiple missing formatting specifiers");
+ for (sp, msg) in errs {
+ diag.span_label(sp, msg);
+ }
diag
}
};
--- /dev/null
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name = "foo"]
+
+// compile-flags: -Z unstable-options --disable-per-crate-search
+
+// @!has 'foo/struct.Foo.html' '//*[id="crate-search"]'
+pub struct Foo;
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:1:22
|
LL | extern crate core as bäz; //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:3:5
|
LL | use föö::bar; //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:5:5
|
LL | mod föö { //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:9:4
|
LL | fn bär( //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:10:5
|
LL | bäz: isize //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:12:9
|
LL | let _ö: isize; //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:15:10
|
LL | (_ä, _) => {} //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:19:8
|
LL | struct Föö { //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:20:5
|
LL | föö: isize //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:23:6
|
LL | enum Bär { //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:24:5
|
LL | Bäz { //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:25:9
|
LL | qüx: isize //~ ERROR non-ascii idents
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/feature-gate-non_ascii_idents.rs:30:8
|
LL | fn qüx(); //~ ERROR non-ascii idents
asdf}
", asdf=1);
//~^^ ERROR invalid format string
+ println!("\t{}");
+ //~^ ERROR 1 positional argument in format string
}
|
= note: if you intended to print `{`, you can escape it using `{{`
-error: aborting due to 13 previous errors
+error: 1 positional argument in format string, but no arguments were given
+ --> $DIR/format-string-error-2.rs:70:17
+ |
+LL | println!("/t{}");
+ | ^^
+
+error: aborting due to 14 previous errors
--> $DIR/ifmt-bad-arg.rs:9:20
|
LL | format!("{1}", 1);
- | ----- ^
+ | ----- ^ argument never used
| |
| formatting specifier missing
--> $DIR/ifmt-bad-arg.rs:32:17
|
LL | format!("", 1, 2); //~ ERROR: multiple unused formatting arguments
- | -- ^ ^
- | |
+ | -- ^ ^ argument never used
+ | | |
+ | | argument never used
| multiple missing formatting specifiers
error: argument never used
--> $DIR/ifmt-bad-arg.rs:33:22
|
LL | format!("{}", 1, 2); //~ ERROR: argument never used
- | ---- ^
+ | ---- ^ argument never used
| |
| formatting specifier missing
--> $DIR/ifmt-bad-arg.rs:34:20
|
LL | format!("{1}", 1, 2); //~ ERROR: argument never used
- | ----- ^
+ | ----- ^ argument never used
| |
| formatting specifier missing
--> $DIR/ifmt-bad-arg.rs:35:26
|
LL | format!("{}", 1, foo=2); //~ ERROR: named argument never used
- | ---- ^
+ | ---- ^ named argument never used
| |
| formatting specifier missing
--> $DIR/ifmt-bad-arg.rs:36:22
|
LL | format!("{foo}", 1, foo=2); //~ ERROR: argument never used
- | ------- ^
+ | ------- ^ argument never used
| |
| formatting specifier missing
--> $DIR/ifmt-bad-arg.rs:37:21
|
LL | format!("", foo=2); //~ ERROR: named argument never used
- | -- ^
+ | -- ^ named argument never used
| |
| formatting specifier missing
--> $DIR/ifmt-bad-arg.rs:38:32
|
LL | format!("{} {}", 1, 2, foo=1, bar=2); //~ ERROR: multiple unused formatting arguments
- | ------- ^ ^
- | |
+ | ------- ^ ^ named argument never used
+ | | |
+ | | named argument never used
| multiple missing formatting specifiers
error: duplicate argument named `foo`
--> $DIR/ifmt-bad-arg.rs:45:51
|
LL | format!("{valuea} {valueb}", valuea=5, valuec=7);
- | ------------------- ^
+ | ------------------- ^ named argument never used
| |
| formatting specifier missing
--> $DIR/ifmt-bad-arg.rs:56:27
|
LL | format!("foo %s baz", "bar"); //~ ERROR: argument never used
- | -- ^^^^^
+ | -- ^^^^^ argument never used
| |
| help: format specifiers use curly braces: `{}`
|
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/local-modularized-tricky-fail-2.rs:20:32
|
LL | exported!();
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/local-modularized-tricky-fail-2.rs:36:24
|
LL | panic!();
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/local-modularized-tricky-fail-2.rs:46:24
|
LL | include!();
--> $DIR/format-foreign.rs:2:30
|
LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments
- | -------------- ^^^^^^^^ ^^^^^^^ ^
- | |
+ | -------------- ^^^^^^^^ ^^^^^^^ ^ argument never used
+ | | | |
+ | | | argument never used
+ | | argument never used
| multiple missing formatting specifiers
|
= note: printf formatting not supported; see the documentation for `std::fmt`
--> $DIR/format-foreign.rs:3:29
|
LL | println!("%1$*2$.*3$f", 123.456); //~ ERROR never used
- | ----------- ^^^^^^^
+ | ----------- ^^^^^^^ argument never used
| |
| help: format specifiers use curly braces: `{0:1$.2$}`
|
| ______________-
LL | | %s!/n
LL | | "###, "Hello,", "World", 4);
- | | - ^^^^^^^^ ^^^^^^^ ^
- | |____|
+ | | - ^^^^^^^^ ^^^^^^^ ^ argument never used
+ | | | | |
+ | | | | argument never used
+ | |____| argument never used
| multiple missing formatting specifiers
|
= note: printf formatting not supported; see the documentation for `std::fmt`
--> $DIR/format-foreign.rs:12:30
|
LL | println!("{} %f", "one", 2.0); //~ ERROR never used
- | ------- ^^^
+ | ------- ^^^ argument never used
| |
| formatting specifier missing
--> $DIR/format-foreign.rs:14:39
|
LL | println!("Hi there, $NAME.", NAME="Tim"); //~ ERROR never used
- | ----- ^^^^^
+ | ----- ^^^^^ named argument never used
| |
| help: format specifiers use curly braces: `{NAME}`
|
--> $DIR/format-foreign.rs:15:32
|
LL | println!("$1 $0 $$ $NAME", 1, 2, NAME=3);
- | ---------------- ^ ^ ^
- | |
+ | ---------------- ^ ^ ^ named argument never used
+ | | | |
+ | | | argument never used
+ | | argument never used
| multiple missing formatting specifiers
|
= note: shell formatting not supported; see the documentation for `std::fmt`
--> $DIR/format-unused-lables.rs:2:22
|
LL | println!("Test", 123, 456, 789);
- | ------ ^^^ ^^^ ^^^
- | |
+ | ------ ^^^ ^^^ ^^^ argument never used
+ | | | |
+ | | | argument never used
+ | | argument never used
| multiple missing formatting specifiers
error: multiple unused formatting arguments
LL | println!("Test2",
| ------- multiple missing formatting specifiers
LL | 123, //~ ERROR multiple unused formatting arguments
- | ^^^
+ | ^^^ argument never used
LL | 456,
- | ^^^
+ | ^^^ argument never used
LL | 789
- | ^^^
+ | ^^^ argument never used
error: named argument never used
--> $DIR/format-unused-lables.rs:11:35
|
LL | println!("Some stuff", UNUSED="args"); //~ ERROR named argument never used
- | ------------ ^^^^^^
+ | ------------ ^^^^^^ named argument never used
| |
| formatting specifier missing
| | help: format specifiers use curly braces: `{STUFF}`
| multiple missing formatting specifiers
LL | "woo!", //~ ERROR multiple unused formatting arguments
- | ^^^^^^
+ | ^^^^^^ argument never used
LL | STUFF=
LL | "things"
- | ^^^^^^^^
+ | ^^^^^^^^ named argument never used
LL | , UNUSED="args");
- | ^^^^^^
+ | ^^^^^^ named argument never used
|
= note: shell formatting not supported; see the documentation for `std::fmt`
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/utf8_idents.rs:4:5
|
LL | 'β, //~ ERROR non-ascii idents are not fully supported
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/utf8_idents.rs:5:5
|
LL | γ //~ ERROR non-ascii idents are not fully supported
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/utf8_idents.rs:9:5
|
LL | δ: usize //~ ERROR non-ascii idents are not fully supported
|
= help: add #![feature(non_ascii_idents)] to the crate attributes to enable
-error[E0658]: non-ascii idents are not fully supported. (see issue #28979)
+error[E0658]: non-ascii idents are not fully supported. (see issue #55467)
--> $DIR/utf8_idents.rs:13:9
|
LL | let α = 0.00001f64; //~ ERROR non-ascii idents are not fully supported
-Subproject commit fc24fce73f878e641094b1802df1e748c5fe233a
+Subproject commit f7bdf500d93895b6c02f8ae6a73002207f85e523