mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 04:08:40 +00:00
Auto merge of #108421 - Dylan-DPC:rollup-mpeovxd, r=Dylan-DPC
Rollup of 10 pull requests Successful merges: - #106541 (implement const iterator using `rustc_do_not_const_check`) - #106918 (Rebuild BinaryHeap on unwind from retain) - #106923 (Restore behavior when primary bundle is missing) - #108169 (Make query keys `Copy`) - #108287 (Add test for bad cast with deferred projection equality) - #108370 (std: time: Avoid to use "was created" in elapsed() description) - #108377 (Fix ICE in 'duplicate diagnostic item' diagnostic) - #108388 (parser: provide better suggestions and errors on closures with braces missing) - #108391 (Fix `is_terminal`'s handling of long paths on Windows.) - #108401 (diagnostics: remove inconsistent English article "this" from E0107) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
c5c7d2b377
@ -135,7 +135,10 @@ pub fn fluent_bundle(
|
|||||||
|
|
||||||
let fallback_locale = langid!("en-US");
|
let fallback_locale = langid!("en-US");
|
||||||
let requested_fallback_locale = requested_locale.as_ref() == Some(&fallback_locale);
|
let requested_fallback_locale = requested_locale.as_ref() == Some(&fallback_locale);
|
||||||
|
trace!(?requested_fallback_locale);
|
||||||
|
if requested_fallback_locale && additional_ftl_path.is_none() {
|
||||||
|
return Ok(None);
|
||||||
|
}
|
||||||
// If there is only `-Z additional-ftl-path`, assume locale is "en-US", otherwise use user
|
// If there is only `-Z additional-ftl-path`, assume locale is "en-US", otherwise use user
|
||||||
// provided locale.
|
// provided locale.
|
||||||
let locale = requested_locale.clone().unwrap_or(fallback_locale);
|
let locale = requested_locale.clone().unwrap_or(fallback_locale);
|
||||||
@ -153,7 +156,7 @@ pub fn fluent_bundle(
|
|||||||
bundle.set_use_isolating(with_directionality_markers);
|
bundle.set_use_isolating(with_directionality_markers);
|
||||||
|
|
||||||
// If the user requests the default locale then don't try to load anything.
|
// If the user requests the default locale then don't try to load anything.
|
||||||
if !requested_fallback_locale && let Some(requested_locale) = requested_locale {
|
if let Some(requested_locale) = requested_locale {
|
||||||
let mut found_resources = false;
|
let mut found_resources = false;
|
||||||
for sysroot in user_provided_sysroot.iter_mut().chain(sysroot_candidates.iter_mut()) {
|
for sysroot in user_provided_sysroot.iter_mut().chain(sysroot_candidates.iter_mut()) {
|
||||||
sysroot.push("share");
|
sysroot.push("share");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::error::TranslateError;
|
use crate::error::{TranslateError, TranslateErrorKind};
|
||||||
use crate::snippet::Style;
|
use crate::snippet::Style;
|
||||||
use crate::{DiagnosticArg, DiagnosticMessage, FluentBundle};
|
use crate::{DiagnosticArg, DiagnosticMessage, FluentBundle};
|
||||||
use rustc_data_structures::sync::Lrc;
|
use rustc_data_structures::sync::Lrc;
|
||||||
@ -95,6 +95,16 @@ pub trait Translate {
|
|||||||
// The primary bundle was present and translation succeeded
|
// The primary bundle was present and translation succeeded
|
||||||
Some(Ok(t)) => t,
|
Some(Ok(t)) => t,
|
||||||
|
|
||||||
|
// If `translate_with_bundle` returns `Err` with the primary bundle, this is likely
|
||||||
|
// just that the primary bundle doesn't contain the message being translated, so
|
||||||
|
// proceed to the fallback bundle.
|
||||||
|
Some(Err(
|
||||||
|
primary @ TranslateError::One {
|
||||||
|
kind: TranslateErrorKind::MessageMissing, ..
|
||||||
|
},
|
||||||
|
)) => translate_with_bundle(self.fallback_fluent_bundle())
|
||||||
|
.map_err(|fallback| primary.and(fallback))?,
|
||||||
|
|
||||||
// Always yeet out for errors on debug (unless
|
// Always yeet out for errors on debug (unless
|
||||||
// `RUSTC_TRANSLATION_NO_DEBUG_ASSERT` is set in the environment - this allows
|
// `RUSTC_TRANSLATION_NO_DEBUG_ASSERT` is set in the environment - this allows
|
||||||
// local runs of the test suites, of builds with debug assertions, to test the
|
// local runs of the test suites, of builds with debug assertions, to test the
|
||||||
@ -106,9 +116,8 @@ pub trait Translate {
|
|||||||
do yeet primary
|
do yeet primary
|
||||||
}
|
}
|
||||||
|
|
||||||
// If `translate_with_bundle` returns `Err` with the primary bundle, this is likely
|
// ..otherwise, for end users, an error about this wouldn't be useful or actionable, so
|
||||||
// just that the primary bundle doesn't contain the message being translated or
|
// just hide it and try with the fallback bundle.
|
||||||
// something else went wrong) so proceed to the fallback bundle.
|
|
||||||
Some(Err(primary)) => translate_with_bundle(self.fallback_fluent_bundle())
|
Some(Err(primary)) => translate_with_bundle(self.fallback_fluent_bundle())
|
||||||
.map_err(|fallback| primary.and(fallback))?,
|
.map_err(|fallback| primary.and(fallback))?,
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
|
|||||||
|
|
||||||
if self.gen_args.span_ext().is_some() {
|
if self.gen_args.span_ext().is_some() {
|
||||||
format!(
|
format!(
|
||||||
"this {} takes {}{} {} argument{} but {} {} supplied",
|
"{} takes {}{} {} argument{} but {} {} supplied",
|
||||||
def_kind,
|
def_kind,
|
||||||
quantifier,
|
quantifier,
|
||||||
bound,
|
bound,
|
||||||
|
@ -71,7 +71,7 @@ use rustc_middle::ty::{self, Ty, TyCtxt};
|
|||||||
use rustc_session::config;
|
use rustc_session::config;
|
||||||
use rustc_session::Session;
|
use rustc_session::Session;
|
||||||
use rustc_span::def_id::{DefId, LocalDefId};
|
use rustc_span::def_id::{DefId, LocalDefId};
|
||||||
use rustc_span::Span;
|
use rustc_span::{sym, Span};
|
||||||
|
|
||||||
fluent_messages! { "../locales/en-US.ftl" }
|
fluent_messages! { "../locales/en-US.ftl" }
|
||||||
|
|
||||||
@ -207,6 +207,11 @@ fn typeck_with_fallback<'tcx>(
|
|||||||
|
|
||||||
let typeck_results = Inherited::build(tcx, def_id).enter(|inh| {
|
let typeck_results = Inherited::build(tcx, def_id).enter(|inh| {
|
||||||
let param_env = tcx.param_env(def_id);
|
let param_env = tcx.param_env(def_id);
|
||||||
|
let param_env = if tcx.has_attr(def_id.to_def_id(), sym::rustc_do_not_const_check) {
|
||||||
|
param_env.without_const()
|
||||||
|
} else {
|
||||||
|
param_env
|
||||||
|
};
|
||||||
let mut fcx = FnCtxt::new(&inh, param_env, def_id);
|
let mut fcx = FnCtxt::new(&inh, param_env, def_id);
|
||||||
|
|
||||||
if let Some(hir::FnSig { header, decl, .. }) = fn_sig {
|
if let Some(hir::FnSig { header, decl, .. }) = fn_sig {
|
||||||
|
@ -982,7 +982,11 @@ impl<'a> Parser<'a> {
|
|||||||
let initial_semicolon = self.token.span;
|
let initial_semicolon = self.token.span;
|
||||||
|
|
||||||
while self.eat(&TokenKind::Semi) {
|
while self.eat(&TokenKind::Semi) {
|
||||||
let _ = self.parse_stmt(ForceCollect::Yes)?;
|
let _ =
|
||||||
|
self.parse_stmt_without_recovery(false, ForceCollect::Yes).unwrap_or_else(|e| {
|
||||||
|
e.cancel();
|
||||||
|
None
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
expect_err.set_primary_message(
|
expect_err.set_primary_message(
|
||||||
|
@ -407,10 +407,10 @@ passes_duplicate_diagnostic_item =
|
|||||||
|
|
||||||
passes_duplicate_diagnostic_item_in_crate =
|
passes_duplicate_diagnostic_item_in_crate =
|
||||||
duplicate diagnostic item in crate `{$crate_name}`: `{$name}`.
|
duplicate diagnostic item in crate `{$crate_name}`: `{$name}`.
|
||||||
|
.note = the diagnostic item is first defined in crate `{$orig_crate_name}`.
|
||||||
|
|
||||||
passes_diagnostic_item_first_defined =
|
passes_diagnostic_item_first_defined =
|
||||||
the diagnostic item is first defined here
|
the diagnostic item is first defined here
|
||||||
.note = the diagnostic item is first defined in crate `{$orig_crate_name}`.
|
|
||||||
|
|
||||||
passes_abi =
|
passes_abi =
|
||||||
abi: {$abi}
|
abi: {$abi}
|
||||||
|
@ -21,7 +21,7 @@ pub trait QueryStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub trait QueryCache: QueryStorage + Sized {
|
pub trait QueryCache: QueryStorage + Sized {
|
||||||
type Key: Hash + Eq + Clone + Debug;
|
type Key: Hash + Eq + Copy + Debug;
|
||||||
|
|
||||||
/// Checks if the query is already computed and in the cache.
|
/// Checks if the query is already computed and in the cache.
|
||||||
/// It returns the shard index and a lock guard to the shard,
|
/// It returns the shard index and a lock guard to the shard,
|
||||||
@ -61,7 +61,7 @@ impl<K: Eq + Hash, V: Copy + Debug> QueryStorage for DefaultCache<K, V> {
|
|||||||
|
|
||||||
impl<K, V> QueryCache for DefaultCache<K, V>
|
impl<K, V> QueryCache for DefaultCache<K, V>
|
||||||
where
|
where
|
||||||
K: Eq + Hash + Clone + Debug,
|
K: Eq + Hash + Copy + Debug,
|
||||||
V: Copy + Debug,
|
V: Copy + Debug,
|
||||||
{
|
{
|
||||||
type Key = K;
|
type Key = K;
|
||||||
@ -179,7 +179,7 @@ impl<K: Eq + Idx, V: Copy + Debug> QueryStorage for VecCache<K, V> {
|
|||||||
|
|
||||||
impl<K, V> QueryCache for VecCache<K, V>
|
impl<K, V> QueryCache for VecCache<K, V>
|
||||||
where
|
where
|
||||||
K: Eq + Idx + Clone + Debug,
|
K: Eq + Idx + Copy + Debug,
|
||||||
V: Copy + Debug,
|
V: Copy + Debug,
|
||||||
{
|
{
|
||||||
type Key = K;
|
type Key = K;
|
||||||
|
@ -19,7 +19,9 @@ pub type TryLoadFromDisk<Qcx, Q> =
|
|||||||
pub trait QueryConfig<Qcx: QueryContext> {
|
pub trait QueryConfig<Qcx: QueryContext> {
|
||||||
const NAME: &'static str;
|
const NAME: &'static str;
|
||||||
|
|
||||||
type Key: DepNodeParams<Qcx::DepContext> + Eq + Hash + Clone + Debug;
|
// `Key` and `Value` are `Copy` instead of `Clone` to ensure copying them stays cheap,
|
||||||
|
// but it isn't necessary.
|
||||||
|
type Key: DepNodeParams<Qcx::DepContext> + Eq + Hash + Copy + Debug;
|
||||||
type Value: Debug + Copy;
|
type Value: Debug + Copy;
|
||||||
|
|
||||||
type Cache: QueryCache<Key = Self::Key, Value = Self::Value>;
|
type Cache: QueryCache<Key = Self::Key, Value = Self::Value>;
|
||||||
|
@ -48,7 +48,7 @@ enum QueryResult<D: DepKind> {
|
|||||||
|
|
||||||
impl<K, D> QueryState<K, D>
|
impl<K, D> QueryState<K, D>
|
||||||
where
|
where
|
||||||
K: Eq + Hash + Clone + Debug,
|
K: Eq + Hash + Copy + Debug,
|
||||||
D: DepKind,
|
D: DepKind,
|
||||||
{
|
{
|
||||||
pub fn all_inactive(&self) -> bool {
|
pub fn all_inactive(&self) -> bool {
|
||||||
@ -77,7 +77,7 @@ where
|
|||||||
for shard in shards.iter() {
|
for shard in shards.iter() {
|
||||||
for (k, v) in shard.iter() {
|
for (k, v) in shard.iter() {
|
||||||
if let QueryResult::Started(ref job) = *v {
|
if let QueryResult::Started(ref job) = *v {
|
||||||
let query = make_query(qcx, k.clone());
|
let query = make_query(qcx, *k);
|
||||||
jobs.insert(job.id, QueryJobInfo { query, job: job.clone() });
|
jobs.insert(job.id, QueryJobInfo { query, job: job.clone() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ where
|
|||||||
// really hurt much.)
|
// really hurt much.)
|
||||||
for (k, v) in self.active.try_lock()?.iter() {
|
for (k, v) in self.active.try_lock()?.iter() {
|
||||||
if let QueryResult::Started(ref job) = *v {
|
if let QueryResult::Started(ref job) = *v {
|
||||||
let query = make_query(qcx, k.clone());
|
let query = make_query(qcx, *k);
|
||||||
jobs.insert(job.id, QueryJobInfo { query, job: job.clone() });
|
jobs.insert(job.id, QueryJobInfo { query, job: job.clone() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ impl<K, D: DepKind> Default for QueryState<K, D> {
|
|||||||
/// This will poison the relevant query if dropped.
|
/// This will poison the relevant query if dropped.
|
||||||
struct JobOwner<'tcx, K, D: DepKind>
|
struct JobOwner<'tcx, K, D: DepKind>
|
||||||
where
|
where
|
||||||
K: Eq + Hash + Clone,
|
K: Eq + Hash + Copy,
|
||||||
{
|
{
|
||||||
state: &'tcx QueryState<K, D>,
|
state: &'tcx QueryState<K, D>,
|
||||||
key: K,
|
key: K,
|
||||||
@ -163,7 +163,7 @@ where
|
|||||||
|
|
||||||
impl<'tcx, K, D: DepKind> JobOwner<'tcx, K, D>
|
impl<'tcx, K, D: DepKind> JobOwner<'tcx, K, D>
|
||||||
where
|
where
|
||||||
K: Eq + Hash + Clone,
|
K: Eq + Hash + Copy,
|
||||||
{
|
{
|
||||||
/// Either gets a `JobOwner` corresponding the query, allowing us to
|
/// Either gets a `JobOwner` corresponding the query, allowing us to
|
||||||
/// start executing the query, or returns with the result of the query.
|
/// start executing the query, or returns with the result of the query.
|
||||||
@ -195,7 +195,7 @@ where
|
|||||||
let job = qcx.current_query_job();
|
let job = qcx.current_query_job();
|
||||||
let job = QueryJob::new(id, span, job);
|
let job = QueryJob::new(id, span, job);
|
||||||
|
|
||||||
let key = entry.key().clone();
|
let key = *entry.key();
|
||||||
entry.insert(QueryResult::Started(job));
|
entry.insert(QueryResult::Started(job));
|
||||||
|
|
||||||
let owner = JobOwner { state, id, key };
|
let owner = JobOwner { state, id, key };
|
||||||
@ -274,7 +274,7 @@ where
|
|||||||
|
|
||||||
impl<'tcx, K, D> Drop for JobOwner<'tcx, K, D>
|
impl<'tcx, K, D> Drop for JobOwner<'tcx, K, D>
|
||||||
where
|
where
|
||||||
K: Eq + Hash + Clone,
|
K: Eq + Hash + Copy,
|
||||||
D: DepKind,
|
D: DepKind,
|
||||||
{
|
{
|
||||||
#[inline(never)]
|
#[inline(never)]
|
||||||
@ -291,7 +291,7 @@ where
|
|||||||
QueryResult::Started(job) => job,
|
QueryResult::Started(job) => job,
|
||||||
QueryResult::Poisoned => panic!(),
|
QueryResult::Poisoned => panic!(),
|
||||||
};
|
};
|
||||||
shard.insert(self.key.clone(), QueryResult::Poisoned);
|
shard.insert(self.key, QueryResult::Poisoned);
|
||||||
job
|
job
|
||||||
};
|
};
|
||||||
// Also signal the completion of the job, so waiters
|
// Also signal the completion of the job, so waiters
|
||||||
@ -310,7 +310,7 @@ pub(crate) struct CycleError<D: DepKind> {
|
|||||||
/// The result of `try_start`.
|
/// The result of `try_start`.
|
||||||
enum TryGetJob<'tcx, K, D>
|
enum TryGetJob<'tcx, K, D>
|
||||||
where
|
where
|
||||||
K: Eq + Hash + Clone,
|
K: Eq + Hash + Copy,
|
||||||
D: DepKind,
|
D: DepKind,
|
||||||
{
|
{
|
||||||
/// The query is not yet started. Contains a guard to the cache eventually used to start it.
|
/// The query is not yet started. Contains a guard to the cache eventually used to start it.
|
||||||
@ -358,10 +358,9 @@ where
|
|||||||
Q: QueryConfig<Qcx>,
|
Q: QueryConfig<Qcx>,
|
||||||
Qcx: QueryContext,
|
Qcx: QueryContext,
|
||||||
{
|
{
|
||||||
match JobOwner::<'_, Q::Key, Qcx::DepKind>::try_start(&qcx, state, span, key.clone()) {
|
match JobOwner::<'_, Q::Key, Qcx::DepKind>::try_start(&qcx, state, span, key) {
|
||||||
TryGetJob::NotYetStarted(job) => {
|
TryGetJob::NotYetStarted(job) => {
|
||||||
let (result, dep_node_index) =
|
let (result, dep_node_index) = execute_job::<Q, Qcx>(qcx, key, dep_node, job.id);
|
||||||
execute_job::<Q, Qcx>(qcx, key.clone(), dep_node, job.id);
|
|
||||||
if Q::FEEDABLE {
|
if Q::FEEDABLE {
|
||||||
// We should not compute queries that also got a value via feeding.
|
// We should not compute queries that also got a value via feeding.
|
||||||
// This can't happen, as query feeding adds the very dependencies to the fed query
|
// This can't happen, as query feeding adds the very dependencies to the fed query
|
||||||
@ -551,7 +550,7 @@ where
|
|||||||
let prof_timer = qcx.dep_context().profiler().query_provider();
|
let prof_timer = qcx.dep_context().profiler().query_provider();
|
||||||
|
|
||||||
// The dep-graph for this computation is already in-place.
|
// The dep-graph for this computation is already in-place.
|
||||||
let result = dep_graph.with_ignore(|| Q::compute(qcx, key.clone()));
|
let result = dep_graph.with_ignore(|| Q::compute(qcx, *key));
|
||||||
|
|
||||||
prof_timer.finish_with_query_invocation_id(dep_node_index.into());
|
prof_timer.finish_with_query_invocation_id(dep_node_index.into());
|
||||||
|
|
||||||
|
@ -851,18 +851,30 @@ impl<T: Ord> BinaryHeap<T> {
|
|||||||
where
|
where
|
||||||
F: FnMut(&T) -> bool,
|
F: FnMut(&T) -> bool,
|
||||||
{
|
{
|
||||||
let mut first_removed = self.len();
|
struct RebuildOnDrop<'a, T: Ord> {
|
||||||
|
heap: &'a mut BinaryHeap<T>,
|
||||||
|
first_removed: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut guard = RebuildOnDrop { first_removed: self.len(), heap: self };
|
||||||
|
|
||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
self.data.retain(|e| {
|
guard.heap.data.retain(|e| {
|
||||||
let keep = f(e);
|
let keep = f(e);
|
||||||
if !keep && i < first_removed {
|
if !keep && i < guard.first_removed {
|
||||||
first_removed = i;
|
guard.first_removed = i;
|
||||||
}
|
}
|
||||||
i += 1;
|
i += 1;
|
||||||
keep
|
keep
|
||||||
});
|
});
|
||||||
// data[0..first_removed] is untouched, so we only need to rebuild the tail:
|
|
||||||
self.rebuild_tail(first_removed);
|
impl<'a, T: Ord> Drop for RebuildOnDrop<'a, T> {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
// data[..first_removed] is untouched, so we only need to
|
||||||
|
// rebuild the tail:
|
||||||
|
self.heap.rebuild_tail(self.first_removed);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,6 +474,25 @@ fn test_retain() {
|
|||||||
assert!(a.is_empty());
|
assert!(a.is_empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_retain_catch_unwind() {
|
||||||
|
let mut heap = BinaryHeap::from(vec![3, 1, 2]);
|
||||||
|
|
||||||
|
// Removes the 3, then unwinds out of retain.
|
||||||
|
let _ = catch_unwind(AssertUnwindSafe(|| {
|
||||||
|
heap.retain(|e| {
|
||||||
|
if *e == 1 {
|
||||||
|
panic!();
|
||||||
|
}
|
||||||
|
false
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Naively this would be [1, 2] (an invalid heap) if BinaryHeap delegates to
|
||||||
|
// Vec's retain impl and then does not rebuild the heap after that unwinds.
|
||||||
|
assert_eq!(heap.into_vec(), [2, 1]);
|
||||||
|
}
|
||||||
|
|
||||||
// old binaryheap failed this test
|
// old binaryheap failed this test
|
||||||
//
|
//
|
||||||
// Integrity means that all elements are present after a comparison panics,
|
// Integrity means that all elements are present after a comparison panics,
|
||||||
|
@ -69,6 +69,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item = ()>) {}
|
|||||||
#[doc(notable_trait)]
|
#[doc(notable_trait)]
|
||||||
#[rustc_diagnostic_item = "Iterator"]
|
#[rustc_diagnostic_item = "Iterator"]
|
||||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||||
|
#[cfg_attr(not(bootstrap), const_trait)]
|
||||||
pub trait Iterator {
|
pub trait Iterator {
|
||||||
/// The type of the elements being iterated over.
|
/// The type of the elements being iterated over.
|
||||||
#[rustc_diagnostic_item = "IteratorItem"]
|
#[rustc_diagnostic_item = "IteratorItem"]
|
||||||
@ -141,6 +142,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "iter_next_chunk", reason = "recently added", issue = "98326")]
|
#[unstable(feature = "iter_next_chunk", reason = "recently added", issue = "98326")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn next_chunk<const N: usize>(
|
fn next_chunk<const N: usize>(
|
||||||
&mut self,
|
&mut self,
|
||||||
) -> Result<[Self::Item; N], array::IntoIter<Self::Item, N>>
|
) -> Result<[Self::Item; N], array::IntoIter<Self::Item, N>>
|
||||||
@ -218,6 +220,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||||
(0, None)
|
(0, None)
|
||||||
}
|
}
|
||||||
@ -255,6 +258,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn count(self) -> usize
|
fn count(self) -> usize
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -285,6 +289,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn last(self) -> Option<Self::Item>
|
fn last(self) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -331,6 +336,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "iter_advance_by", reason = "recently added", issue = "77404")]
|
#[unstable(feature = "iter_advance_by", reason = "recently added", issue = "77404")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn advance_by(&mut self, n: usize) -> Result<(), usize> {
|
fn advance_by(&mut self, n: usize) -> Result<(), usize> {
|
||||||
for i in 0..n {
|
for i in 0..n {
|
||||||
self.next().ok_or(i)?;
|
self.next().ok_or(i)?;
|
||||||
@ -379,6 +385,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn nth(&mut self, n: usize) -> Option<Self::Item> {
|
fn nth(&mut self, n: usize) -> Option<Self::Item> {
|
||||||
self.advance_by(n).ok()?;
|
self.advance_by(n).ok()?;
|
||||||
self.next()
|
self.next()
|
||||||
@ -431,6 +438,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iterator_step_by", since = "1.28.0")]
|
#[stable(feature = "iterator_step_by", since = "1.28.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn step_by(self, step: usize) -> StepBy<Self>
|
fn step_by(self, step: usize) -> StepBy<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -502,6 +510,7 @@ pub trait Iterator {
|
|||||||
/// [`OsStr`]: ../../std/ffi/struct.OsStr.html
|
/// [`OsStr`]: ../../std/ffi/struct.OsStr.html
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter>
|
fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -620,6 +629,7 @@ pub trait Iterator {
|
|||||||
/// [`zip`]: crate::iter::zip
|
/// [`zip`]: crate::iter::zip
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter>
|
fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -662,6 +672,7 @@ pub trait Iterator {
|
|||||||
/// [`intersperse_with`]: Iterator::intersperse_with
|
/// [`intersperse_with`]: Iterator::intersperse_with
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
|
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
|
fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -720,6 +731,7 @@ pub trait Iterator {
|
|||||||
/// [`intersperse`]: Iterator::intersperse
|
/// [`intersperse`]: Iterator::intersperse
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
|
#[unstable(feature = "iter_intersperse", reason = "recently added", issue = "79524")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
|
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -779,6 +791,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn map<B, F>(self, f: F) -> Map<Self, F>
|
fn map<B, F>(self, f: F) -> Map<Self, F>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -824,6 +837,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iterator_for_each", since = "1.21.0")]
|
#[stable(feature = "iterator_for_each", since = "1.21.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn for_each<F>(self, f: F)
|
fn for_each<F>(self, f: F)
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -899,6 +913,7 @@ pub trait Iterator {
|
|||||||
/// Note that `iter.filter(f).next()` is equivalent to `iter.find(f)`.
|
/// Note that `iter.filter(f).next()` is equivalent to `iter.find(f)`.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn filter<P>(self, predicate: P) -> Filter<Self, P>
|
fn filter<P>(self, predicate: P) -> Filter<Self, P>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -944,6 +959,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
|
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -990,6 +1006,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn enumerate(self) -> Enumerate<Self>
|
fn enumerate(self) -> Enumerate<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1061,6 +1078,7 @@ pub trait Iterator {
|
|||||||
/// [`next`]: Iterator::next
|
/// [`next`]: Iterator::next
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn peekable(self) -> Peekable<Self>
|
fn peekable(self) -> Peekable<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1126,6 +1144,7 @@ pub trait Iterator {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[doc(alias = "drop_while")]
|
#[doc(alias = "drop_while")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
|
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1207,6 +1226,7 @@ pub trait Iterator {
|
|||||||
/// the iteration should stop, but wasn't placed back into the iterator.
|
/// the iteration should stop, but wasn't placed back into the iterator.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
|
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1295,6 +1315,7 @@ pub trait Iterator {
|
|||||||
/// [`fuse`]: Iterator::fuse
|
/// [`fuse`]: Iterator::fuse
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iter_map_while", since = "1.57.0")]
|
#[stable(feature = "iter_map_while", since = "1.57.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
|
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1326,6 +1347,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn skip(self, n: usize) -> Skip<Self>
|
fn skip(self, n: usize) -> Skip<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1379,6 +1401,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn take(self, n: usize) -> Take<Self>
|
fn take(self, n: usize) -> Take<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1428,6 +1451,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
|
fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1468,6 +1492,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
|
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1552,6 +1577,7 @@ pub trait Iterator {
|
|||||||
/// [`flat_map()`]: Iterator::flat_map
|
/// [`flat_map()`]: Iterator::flat_map
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iterator_flatten", since = "1.29.0")]
|
#[stable(feature = "iterator_flatten", since = "1.29.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn flatten(self) -> Flatten<Self>
|
fn flatten(self) -> Flatten<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1620,6 +1646,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn fuse(self) -> Fuse<Self>
|
fn fuse(self) -> Fuse<Self>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1704,6 +1731,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn inspect<F>(self, f: F) -> Inspect<Self, F>
|
fn inspect<F>(self, f: F) -> Inspect<Self, F>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1734,6 +1762,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(of_rust, vec!["of", "Rust"]);
|
/// assert_eq!(of_rust, vec!["of", "Rust"]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn by_ref(&mut self) -> &mut Self
|
fn by_ref(&mut self) -> &mut Self
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1853,6 +1882,7 @@ pub trait Iterator {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]
|
#[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]
|
||||||
#[cfg_attr(not(test), rustc_diagnostic_item = "iterator_collect_fn")]
|
#[cfg_attr(not(test), rustc_diagnostic_item = "iterator_collect_fn")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn collect<B: FromIterator<Self::Item>>(self) -> B
|
fn collect<B: FromIterator<Self::Item>>(self) -> B
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -1931,6 +1961,7 @@ pub trait Iterator {
|
|||||||
/// [`collect`]: Iterator::collect
|
/// [`collect`]: Iterator::collect
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "iterator_try_collect", issue = "94047")]
|
#[unstable(feature = "iterator_try_collect", issue = "94047")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn try_collect<B>(&mut self) -> ChangeOutputType<Self::Item, B>
|
fn try_collect<B>(&mut self) -> ChangeOutputType<Self::Item, B>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2004,6 +2035,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "iter_collect_into", reason = "new API", issue = "94780")]
|
#[unstable(feature = "iter_collect_into", reason = "new API", issue = "94780")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn collect_into<E: Extend<Self::Item>>(self, collection: &mut E) -> &mut E
|
fn collect_into<E: Extend<Self::Item>>(self, collection: &mut E) -> &mut E
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2038,6 +2070,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(odd, vec![1, 3]);
|
/// assert_eq!(odd, vec![1, 3]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn partition<B, F>(self, f: F) -> (B, B)
|
fn partition<B, F>(self, f: F) -> (B, B)
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2100,6 +2133,7 @@ pub trait Iterator {
|
|||||||
/// assert!(a[i..].iter().all(|&n| n % 2 == 1)); // odds
|
/// assert!(a[i..].iter().all(|&n| n % 2 == 1)); // odds
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "iter_partition_in_place", reason = "new API", issue = "62543")]
|
#[unstable(feature = "iter_partition_in_place", reason = "new API", issue = "62543")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn partition_in_place<'a, T: 'a, P>(mut self, ref mut predicate: P) -> usize
|
fn partition_in_place<'a, T: 'a, P>(mut self, ref mut predicate: P) -> usize
|
||||||
where
|
where
|
||||||
Self: Sized + DoubleEndedIterator<Item = &'a mut T>,
|
Self: Sized + DoubleEndedIterator<Item = &'a mut T>,
|
||||||
@ -2157,6 +2191,7 @@ pub trait Iterator {
|
|||||||
/// assert!(!"IntoIterator".chars().is_partitioned(char::is_uppercase));
|
/// assert!(!"IntoIterator".chars().is_partitioned(char::is_uppercase));
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "iter_is_partitioned", reason = "new API", issue = "62544")]
|
#[unstable(feature = "iter_is_partitioned", reason = "new API", issue = "62544")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn is_partitioned<P>(mut self, mut predicate: P) -> bool
|
fn is_partitioned<P>(mut self, mut predicate: P) -> bool
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2251,6 +2286,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iterator_try_fold", since = "1.27.0")]
|
#[stable(feature = "iterator_try_fold", since = "1.27.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn try_fold<B, F, R>(&mut self, init: B, mut f: F) -> R
|
fn try_fold<B, F, R>(&mut self, init: B, mut f: F) -> R
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2309,6 +2345,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iterator_try_fold", since = "1.27.0")]
|
#[stable(feature = "iterator_try_fold", since = "1.27.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn try_for_each<F, R>(&mut self, f: F) -> R
|
fn try_for_each<F, R>(&mut self, f: F) -> R
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2428,6 +2465,7 @@ pub trait Iterator {
|
|||||||
#[doc(alias = "inject", alias = "foldl")]
|
#[doc(alias = "inject", alias = "foldl")]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn fold<B, F>(mut self, init: B, mut f: F) -> B
|
fn fold<B, F>(mut self, init: B, mut f: F) -> B
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2465,6 +2503,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iterator_fold_self", since = "1.51.0")]
|
#[stable(feature = "iterator_fold_self", since = "1.51.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn reduce<F>(mut self, f: F) -> Option<Self::Item>
|
fn reduce<F>(mut self, f: F) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2536,6 +2575,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "iterator_try_reduce", reason = "new API", issue = "87053")]
|
#[unstable(feature = "iterator_try_reduce", reason = "new API", issue = "87053")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn try_reduce<F, R>(&mut self, f: F) -> ChangeOutputType<R, Option<R::Output>>
|
fn try_reduce<F, R>(&mut self, f: F) -> ChangeOutputType<R, Option<R::Output>>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2593,6 +2633,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn all<F>(&mut self, f: F) -> bool
|
fn all<F>(&mut self, f: F) -> bool
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2646,6 +2687,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn any<F>(&mut self, f: F) -> bool
|
fn any<F>(&mut self, f: F) -> bool
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2709,6 +2751,7 @@ pub trait Iterator {
|
|||||||
/// Note that `iter.find(f)` is equivalent to `iter.filter(f).next()`.
|
/// Note that `iter.find(f)` is equivalent to `iter.filter(f).next()`.
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
|
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2740,6 +2783,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iterator_find_map", since = "1.30.0")]
|
#[stable(feature = "iterator_find_map", since = "1.30.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn find_map<B, F>(&mut self, f: F) -> Option<B>
|
fn find_map<B, F>(&mut self, f: F) -> Option<B>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2796,6 +2840,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "try_find", reason = "new API", issue = "63178")]
|
#[unstable(feature = "try_find", reason = "new API", issue = "63178")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn try_find<F, R>(&mut self, f: F) -> ChangeOutputType<R, Option<Self::Item>>
|
fn try_find<F, R>(&mut self, f: F) -> ChangeOutputType<R, Option<Self::Item>>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2878,6 +2923,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn position<P>(&mut self, predicate: P) -> Option<usize>
|
fn position<P>(&mut self, predicate: P) -> Option<usize>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -2935,6 +2981,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn rposition<P>(&mut self, predicate: P) -> Option<usize>
|
fn rposition<P>(&mut self, predicate: P) -> Option<usize>
|
||||||
where
|
where
|
||||||
P: FnMut(Self::Item) -> bool,
|
P: FnMut(Self::Item) -> bool,
|
||||||
@ -2986,6 +3033,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn max(self) -> Option<Self::Item>
|
fn max(self) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3024,6 +3072,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn min(self) -> Option<Self::Item>
|
fn min(self) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3046,6 +3095,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iter_cmp_by_key", since = "1.6.0")]
|
#[stable(feature = "iter_cmp_by_key", since = "1.6.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn max_by_key<B: Ord, F>(self, f: F) -> Option<Self::Item>
|
fn max_by_key<B: Ord, F>(self, f: F) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3079,6 +3129,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iter_max_by", since = "1.15.0")]
|
#[stable(feature = "iter_max_by", since = "1.15.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn max_by<F>(self, compare: F) -> Option<Self::Item>
|
fn max_by<F>(self, compare: F) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3106,6 +3157,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iter_cmp_by_key", since = "1.6.0")]
|
#[stable(feature = "iter_cmp_by_key", since = "1.6.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn min_by_key<B: Ord, F>(self, f: F) -> Option<Self::Item>
|
fn min_by_key<B: Ord, F>(self, f: F) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3139,6 +3191,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "iter_min_by", since = "1.15.0")]
|
#[stable(feature = "iter_min_by", since = "1.15.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn min_by<F>(self, compare: F) -> Option<Self::Item>
|
fn min_by<F>(self, compare: F) -> Option<Self::Item>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3176,6 +3229,7 @@ pub trait Iterator {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[doc(alias = "reverse")]
|
#[doc(alias = "reverse")]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn rev(self) -> Rev<Self>
|
fn rev(self) -> Rev<Self>
|
||||||
where
|
where
|
||||||
Self: Sized + DoubleEndedIterator,
|
Self: Sized + DoubleEndedIterator,
|
||||||
@ -3214,6 +3268,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(z, [3, 6]);
|
/// assert_eq!(z, [3, 6]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
|
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
|
||||||
where
|
where
|
||||||
FromA: Default + Extend<A>,
|
FromA: Default + Extend<A>,
|
||||||
@ -3246,6 +3301,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(v_map, vec![1, 2, 3]);
|
/// assert_eq!(v_map, vec![1, 2, 3]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_copied", since = "1.36.0")]
|
#[stable(feature = "iter_copied", since = "1.36.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn copied<'a, T: 'a>(self) -> Copied<Self>
|
fn copied<'a, T: 'a>(self) -> Copied<Self>
|
||||||
where
|
where
|
||||||
Self: Sized + Iterator<Item = &'a T>,
|
Self: Sized + Iterator<Item = &'a T>,
|
||||||
@ -3293,6 +3349,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(&[vec![23]], &faster[..]);
|
/// assert_eq!(&[vec![23]], &faster[..]);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn cloned<'a, T: 'a>(self) -> Cloned<Self>
|
fn cloned<'a, T: 'a>(self) -> Cloned<Self>
|
||||||
where
|
where
|
||||||
Self: Sized + Iterator<Item = &'a T>,
|
Self: Sized + Iterator<Item = &'a T>,
|
||||||
@ -3327,6 +3384,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn cycle(self) -> Cycle<Self>
|
fn cycle(self) -> Cycle<Self>
|
||||||
where
|
where
|
||||||
Self: Sized + Clone,
|
Self: Sized + Clone,
|
||||||
@ -3370,6 +3428,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
#[unstable(feature = "iter_array_chunks", reason = "recently added", issue = "100450")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
|
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3400,6 +3459,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(sum, 6);
|
/// assert_eq!(sum, 6);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_arith", since = "1.11.0")]
|
#[stable(feature = "iter_arith", since = "1.11.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn sum<S>(self) -> S
|
fn sum<S>(self) -> S
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3429,6 +3489,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(factorial(5), 120);
|
/// assert_eq!(factorial(5), 120);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_arith", since = "1.11.0")]
|
#[stable(feature = "iter_arith", since = "1.11.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn product<P>(self) -> P
|
fn product<P>(self) -> P
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3450,6 +3511,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!([1, 2].iter().cmp([1].iter()), Ordering::Greater);
|
/// assert_eq!([1, 2].iter().cmp([1].iter()), Ordering::Greater);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn cmp<I>(self, other: I) -> Ordering
|
fn cmp<I>(self, other: I) -> Ordering
|
||||||
where
|
where
|
||||||
I: IntoIterator<Item = Self::Item>,
|
I: IntoIterator<Item = Self::Item>,
|
||||||
@ -3479,6 +3541,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (2 * x).cmp(&y)), Ordering::Greater);
|
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (2 * x).cmp(&y)), Ordering::Greater);
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "iter_order_by", issue = "64295")]
|
#[unstable(feature = "iter_order_by", issue = "64295")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
|
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3535,6 +3598,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
|
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
|
||||||
where
|
where
|
||||||
I: IntoIterator,
|
I: IntoIterator,
|
||||||
@ -3573,6 +3637,7 @@ pub trait Iterator {
|
|||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "iter_order_by", issue = "64295")]
|
#[unstable(feature = "iter_order_by", issue = "64295")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
|
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3606,6 +3671,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!([1].iter().eq([1, 2].iter()), false);
|
/// assert_eq!([1].iter().eq([1, 2].iter()), false);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn eq<I>(self, other: I) -> bool
|
fn eq<I>(self, other: I) -> bool
|
||||||
where
|
where
|
||||||
I: IntoIterator,
|
I: IntoIterator,
|
||||||
@ -3631,6 +3697,7 @@ pub trait Iterator {
|
|||||||
/// assert!(xs.iter().eq_by(&ys, |&x, &y| x * x == y));
|
/// assert!(xs.iter().eq_by(&ys, |&x, &y| x * x == y));
|
||||||
/// ```
|
/// ```
|
||||||
#[unstable(feature = "iter_order_by", issue = "64295")]
|
#[unstable(feature = "iter_order_by", issue = "64295")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn eq_by<I, F>(self, other: I, eq: F) -> bool
|
fn eq_by<I, F>(self, other: I, eq: F) -> bool
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3663,6 +3730,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!([1].iter().ne([1, 2].iter()), true);
|
/// assert_eq!([1].iter().ne([1, 2].iter()), true);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn ne<I>(self, other: I) -> bool
|
fn ne<I>(self, other: I) -> bool
|
||||||
where
|
where
|
||||||
I: IntoIterator,
|
I: IntoIterator,
|
||||||
@ -3684,6 +3752,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!([1, 2].iter().lt([1, 2].iter()), false);
|
/// assert_eq!([1, 2].iter().lt([1, 2].iter()), false);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn lt<I>(self, other: I) -> bool
|
fn lt<I>(self, other: I) -> bool
|
||||||
where
|
where
|
||||||
I: IntoIterator,
|
I: IntoIterator,
|
||||||
@ -3705,6 +3774,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!([1, 2].iter().le([1, 2].iter()), true);
|
/// assert_eq!([1, 2].iter().le([1, 2].iter()), true);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn le<I>(self, other: I) -> bool
|
fn le<I>(self, other: I) -> bool
|
||||||
where
|
where
|
||||||
I: IntoIterator,
|
I: IntoIterator,
|
||||||
@ -3726,6 +3796,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!([1, 2].iter().gt([1, 2].iter()), false);
|
/// assert_eq!([1, 2].iter().gt([1, 2].iter()), false);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn gt<I>(self, other: I) -> bool
|
fn gt<I>(self, other: I) -> bool
|
||||||
where
|
where
|
||||||
I: IntoIterator,
|
I: IntoIterator,
|
||||||
@ -3747,6 +3818,7 @@ pub trait Iterator {
|
|||||||
/// assert_eq!([1, 2].iter().ge([1, 2].iter()), true);
|
/// assert_eq!([1, 2].iter().ge([1, 2].iter()), true);
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "iter_order", since = "1.5.0")]
|
#[stable(feature = "iter_order", since = "1.5.0")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn ge<I>(self, other: I) -> bool
|
fn ge<I>(self, other: I) -> bool
|
||||||
where
|
where
|
||||||
I: IntoIterator,
|
I: IntoIterator,
|
||||||
@ -3778,6 +3850,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "is_sorted", reason = "new API", issue = "53485")]
|
#[unstable(feature = "is_sorted", reason = "new API", issue = "53485")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn is_sorted(self) -> bool
|
fn is_sorted(self) -> bool
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3806,6 +3879,7 @@ pub trait Iterator {
|
|||||||
///
|
///
|
||||||
/// [`is_sorted`]: Iterator::is_sorted
|
/// [`is_sorted`]: Iterator::is_sorted
|
||||||
#[unstable(feature = "is_sorted", reason = "new API", issue = "53485")]
|
#[unstable(feature = "is_sorted", reason = "new API", issue = "53485")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn is_sorted_by<F>(mut self, compare: F) -> bool
|
fn is_sorted_by<F>(mut self, compare: F) -> bool
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3852,6 +3926,7 @@ pub trait Iterator {
|
|||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "is_sorted", reason = "new API", issue = "53485")]
|
#[unstable(feature = "is_sorted", reason = "new API", issue = "53485")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
fn is_sorted_by_key<F, K>(self, f: F) -> bool
|
fn is_sorted_by_key<F, K>(self, f: F) -> bool
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@ -3867,6 +3942,7 @@ pub trait Iterator {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[unstable(feature = "trusted_random_access", issue = "none")]
|
#[unstable(feature = "trusted_random_access", issue = "none")]
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
unsafe fn __iterator_get_unchecked(&mut self, _idx: usize) -> Self::Item
|
unsafe fn __iterator_get_unchecked(&mut self, _idx: usize) -> Self::Item
|
||||||
where
|
where
|
||||||
Self: TrustedRandomAccessNoCoerce,
|
Self: TrustedRandomAccessNoCoerce,
|
||||||
|
@ -194,6 +194,7 @@
|
|||||||
#![feature(cfg_target_has_atomic_equal_alignment)]
|
#![feature(cfg_target_has_atomic_equal_alignment)]
|
||||||
#![feature(const_closures)]
|
#![feature(const_closures)]
|
||||||
#![feature(const_fn_floating_point_arithmetic)]
|
#![feature(const_fn_floating_point_arithmetic)]
|
||||||
|
#![feature(const_for)]
|
||||||
#![feature(const_mut_refs)]
|
#![feature(const_mut_refs)]
|
||||||
#![feature(const_precise_live_drops)]
|
#![feature(const_precise_live_drops)]
|
||||||
#![feature(const_refs_to_cell)]
|
#![feature(const_refs_to_cell)]
|
||||||
|
@ -539,14 +539,6 @@ pub struct SYMBOLIC_LINK_REPARSE_BUFFER {
|
|||||||
pub PathBuffer: WCHAR,
|
pub PathBuffer: WCHAR,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// NB: Use carefully! In general using this as a reference is likely to get the
|
|
||||||
/// provenance wrong for the `PathBuffer` field!
|
|
||||||
#[repr(C)]
|
|
||||||
pub struct FILE_NAME_INFO {
|
|
||||||
pub FileNameLength: DWORD,
|
|
||||||
pub FileName: [WCHAR; 1],
|
|
||||||
}
|
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct MOUNT_POINT_REPARSE_BUFFER {
|
pub struct MOUNT_POINT_REPARSE_BUFFER {
|
||||||
pub SubstituteNameOffset: c_ushort,
|
pub SubstituteNameOffset: c_ushort,
|
||||||
|
@ -2,8 +2,7 @@ use crate::marker::PhantomData;
|
|||||||
use crate::mem::size_of;
|
use crate::mem::size_of;
|
||||||
use crate::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle};
|
use crate::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle};
|
||||||
use crate::slice;
|
use crate::slice;
|
||||||
use crate::sys::{c, Align8};
|
use crate::sys::c;
|
||||||
use core;
|
|
||||||
use libc;
|
use libc;
|
||||||
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@ -125,22 +124,33 @@ unsafe fn msys_tty_on(handle: c::HANDLE) -> bool {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SIZE: usize = size_of::<c::FILE_NAME_INFO>() + c::MAX_PATH * size_of::<c::WCHAR>();
|
/// Mirrors [`FILE_NAME_INFO`], giving it a fixed length that we can stack
|
||||||
let mut name_info_bytes = Align8([0u8; SIZE]);
|
/// allocate
|
||||||
|
///
|
||||||
|
/// [`FILE_NAME_INFO`]: https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_name_info
|
||||||
|
#[repr(C)]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
struct FILE_NAME_INFO {
|
||||||
|
FileNameLength: u32,
|
||||||
|
FileName: [u16; c::MAX_PATH as usize],
|
||||||
|
}
|
||||||
|
let mut name_info = FILE_NAME_INFO { FileNameLength: 0, FileName: [0; c::MAX_PATH as usize] };
|
||||||
|
// Safety: buffer length is fixed.
|
||||||
let res = c::GetFileInformationByHandleEx(
|
let res = c::GetFileInformationByHandleEx(
|
||||||
handle,
|
handle,
|
||||||
c::FileNameInfo,
|
c::FileNameInfo,
|
||||||
name_info_bytes.0.as_mut_ptr() as *mut libc::c_void,
|
&mut name_info as *mut _ as *mut libc::c_void,
|
||||||
SIZE as u32,
|
size_of::<FILE_NAME_INFO>() as u32,
|
||||||
);
|
);
|
||||||
if res == 0 {
|
if res == 0 {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let name_info: &c::FILE_NAME_INFO = &*(name_info_bytes.0.as_ptr() as *const c::FILE_NAME_INFO);
|
|
||||||
let name_len = name_info.FileNameLength as usize / 2;
|
// Use `get` because `FileNameLength` can be out of range.
|
||||||
// Offset to get the `FileName` field.
|
let s = match name_info.FileName.get(..name_info.FileNameLength as usize / 2) {
|
||||||
let name_ptr = name_info_bytes.0.as_ptr().offset(size_of::<c::DWORD>() as isize).cast::<u16>();
|
None => return false,
|
||||||
let s = core::slice::from_raw_parts(name_ptr, name_len);
|
Some(s) => s,
|
||||||
|
};
|
||||||
let name = String::from_utf16_lossy(s);
|
let name = String::from_utf16_lossy(s);
|
||||||
// Get the file name only.
|
// Get the file name only.
|
||||||
let name = name.rsplit('\\').next().unwrap_or(&name);
|
let name = name.rsplit('\\').next().unwrap_or(&name);
|
||||||
|
@ -352,7 +352,7 @@ impl Instant {
|
|||||||
self.checked_duration_since(earlier).unwrap_or_default()
|
self.checked_duration_since(earlier).unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the amount of time elapsed since this instant was created.
|
/// Returns the amount of time elapsed since this instant.
|
||||||
///
|
///
|
||||||
/// # Panics
|
/// # Panics
|
||||||
///
|
///
|
||||||
@ -525,8 +525,8 @@ impl SystemTime {
|
|||||||
self.0.sub_time(&earlier.0).map_err(SystemTimeError)
|
self.0.sub_time(&earlier.0).map_err(SystemTimeError)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the difference between the clock time when this
|
/// Returns the difference from this system time to the
|
||||||
/// system time was created, and the current clock time.
|
/// current clock time.
|
||||||
///
|
///
|
||||||
/// This function may fail as the underlying system clock is susceptible to
|
/// This function may fail as the underlying system clock is susceptible to
|
||||||
/// drift and updates (e.g., the system clock could go backwards), so this
|
/// drift and updates (e.g., the system clock could go backwards), so this
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/unable-fulfill-trait.rs:4:17
|
--> $DIR/unable-fulfill-trait.rs:4:17
|
||||||
|
|
|
|
||||||
LL | field1: dyn Bar<'a, 'b,>,
|
LL | field1: dyn Bar<'a, 'b,>,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this function takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-100154.rs:4:5
|
--> $DIR/issue-100154.rs:4:5
|
||||||
|
|
|
|
||||||
LL | foo::<()>(());
|
LL | foo::<()>(());
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// edition:2018
|
// edition:2018
|
||||||
|
|
||||||
async fn copy() -> Result<()>
|
async fn copy() -> Result<()>
|
||||||
//~^ ERROR this enum takes 2 generic arguments
|
//~^ ERROR enum takes 2 generic arguments
|
||||||
{
|
{
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-65159.rs:5:20
|
--> $DIR/issue-65159.rs:5:20
|
||||||
|
|
|
|
||||||
LL | async fn copy() -> Result<()>
|
LL | async fn copy() -> Result<()>
|
||||||
|
@ -14,8 +14,8 @@ impl MarketMultiplier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~^^ ERROR this struct takes 1 generic argument but 0 generic arguments were supplied
|
//~^^ ERROR struct takes 1 generic argument but 0 generic arguments were supplied
|
||||||
LockedMarket(generator.lock().unwrap().buy())
|
LockedMarket(generator.lock().unwrap().buy())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
||||||
|
|
|
|
||||||
LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
||||||
@ -12,7 +12,7 @@ note: struct defined here, with 0 lifetime parameters
|
|||||||
LL | struct LockedMarket<T>(T);
|
LL | struct LockedMarket<T>(T);
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
--> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
|
||||||
|
|
|
|
||||||
LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
|
||||||
|
@ -7,8 +7,8 @@ trait X {
|
|||||||
|
|
||||||
const _: () = {
|
const _: () = {
|
||||||
fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
||||||
//~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
|
//~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
|
||||||
//~| ERROR this associated type takes 0 generic arguments but 1 generic argument
|
//~| ERROR associated type takes 0 generic arguments but 1 generic argument
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||||
--> $DIR/issue-102768.rs:9:30
|
--> $DIR/issue-102768.rs:9:30
|
||||||
|
|
|
|
||||||
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
||||||
@ -14,7 +14,7 @@ help: add missing lifetime argument
|
|||||||
LL | fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
|
LL | fn f2<'a>(arg: Box<dyn X<Y<'_, 1> = &'a ()>>) {}
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-102768.rs:9:30
|
--> $DIR/issue-102768.rs:9:30
|
||||||
|
|
|
|
||||||
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
LL | fn f2<'a>(arg: Box<dyn X<Y<1> = &'a ()>>) {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-76595.rs:15:5
|
--> $DIR/issue-76595.rs:15:5
|
||||||
|
|
|
|
||||||
LL | test::<2>();
|
LL | test::<2>();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/incorrect-number-of-const-args.rs:6:5
|
--> $DIR/incorrect-number-of-const-args.rs:6:5
|
||||||
|
|
|
|
||||||
LL | foo::<0>();
|
LL | foo::<0>();
|
||||||
@ -16,7 +16,7 @@ help: add missing generic argument
|
|||||||
LL | foo::<0, Y>();
|
LL | foo::<0, Y>();
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this function takes 2 generic arguments but 3 generic arguments were supplied
|
error[E0107]: function takes 2 generic arguments but 3 generic arguments were supplied
|
||||||
--> $DIR/incorrect-number-of-const-args.rs:9:5
|
--> $DIR/incorrect-number-of-const-args.rs:9:5
|
||||||
|
|
|
|
||||||
LL | foo::<0, 0, 0>();
|
LL | foo::<0, 0, 0>();
|
||||||
|
@ -4,11 +4,11 @@ struct S;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _: u32 = 5i32.try_into::<32>().unwrap();
|
let _: u32 = 5i32.try_into::<32>().unwrap();
|
||||||
//~^ ERROR this method takes
|
//~^ ERROR method takes
|
||||||
|
|
||||||
S.f::<0>();
|
S.f::<0>();
|
||||||
//~^ ERROR no method named `f`
|
//~^ ERROR no method named `f`
|
||||||
|
|
||||||
S::<0>;
|
S::<0>;
|
||||||
//~^ ERROR this struct takes 0
|
//~^ ERROR struct takes 0
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/invalid-const-arg-for-type-param.rs:6:23
|
--> $DIR/invalid-const-arg-for-type-param.rs:6:23
|
||||||
|
|
|
|
||||||
LL | let _: u32 = 5i32.try_into::<32>().unwrap();
|
LL | let _: u32 = 5i32.try_into::<32>().unwrap();
|
||||||
@ -23,7 +23,7 @@ LL | struct S;
|
|||||||
LL | S.f::<0>();
|
LL | S.f::<0>();
|
||||||
| ^ method not found in `S`
|
| ^ method not found in `S`
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/invalid-const-arg-for-type-param.rs:12:5
|
--> $DIR/invalid-const-arg-for-type-param.rs:12:5
|
||||||
|
|
|
|
||||||
LL | S::<0>;
|
LL | S::<0>;
|
||||||
|
@ -2,5 +2,5 @@ use std::cell::Cell;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _: Cell<&str, "a"> = Cell::new("");
|
let _: Cell<&str, "a"> = Cell::new("");
|
||||||
//~^ ERROR this struct takes 1 generic argument but 2 generic arguments were supplied
|
//~^ ERROR struct takes 1 generic argument but 2 generic arguments were supplied
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/invalid-constant-in-args.rs:4:12
|
--> $DIR/invalid-constant-in-args.rs:4:12
|
||||||
|
|
|
|
||||||
LL | let _: Cell<&str, "a"> = Cell::new("");
|
LL | let _: Cell<&str, "a"> = Cell::new("");
|
||||||
|
@ -7,7 +7,7 @@ where
|
|||||||
S: MyTrait,
|
S: MyTrait,
|
||||||
T: MyTrait<Assoc == S::Assoc>,
|
T: MyTrait<Assoc == S::Assoc>,
|
||||||
//~^ ERROR: expected one of `,` or `>`, found `==`
|
//~^ ERROR: expected one of `,` or `>`, found `==`
|
||||||
//~| ERROR: this trait takes 0 generic arguments but 1 generic argument was supplied
|
//~| ERROR: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ help: if you meant to use an associated type binding, replace `==` with `=`
|
|||||||
LL | T: MyTrait<Assoc = S::Assoc>,
|
LL | T: MyTrait<Assoc = S::Assoc>,
|
||||||
| ~
|
| ~
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-87493.rs:8:8
|
--> $DIR/issue-87493.rs:8:8
|
||||||
|
|
|
|
||||||
LL | T: MyTrait<Assoc == S::Assoc>,
|
LL | T: MyTrait<Assoc == S::Assoc>,
|
||||||
|
@ -7,7 +7,7 @@ struct Bar;
|
|||||||
const T: usize = 42;
|
const T: usize = 42;
|
||||||
|
|
||||||
impl Foo<N = 3> for Bar {
|
impl Foo<N = 3> for Bar {
|
||||||
//~^ ERROR this trait takes 1 generic argument but 0 generic arguments were supplied
|
//~^ ERROR trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
//~| ERROR associated type bindings are not allowed here
|
//~| ERROR associated type bindings are not allowed here
|
||||||
//~| ERROR associated const equality is incomplete
|
//~| ERROR associated const equality is incomplete
|
||||||
fn do_x(&self) -> [u8; 3] {
|
fn do_x(&self) -> [u8; 3] {
|
||||||
|
@ -7,7 +7,7 @@ LL | impl Foo<N = 3> for Bar {
|
|||||||
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
|
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
|
||||||
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
|
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/issue-89013-no-kw.rs:9:6
|
--> $DIR/issue-89013-no-kw.rs:9:6
|
||||||
|
|
|
|
||||||
LL | impl Foo<N = 3> for Bar {
|
LL | impl Foo<N = 3> for Bar {
|
||||||
|
@ -8,7 +8,7 @@ const T: usize = 42;
|
|||||||
|
|
||||||
impl Foo<N = const 3> for Bar {
|
impl Foo<N = const 3> for Bar {
|
||||||
//~^ ERROR expected lifetime, type, or constant, found keyword `const`
|
//~^ ERROR expected lifetime, type, or constant, found keyword `const`
|
||||||
//~| ERROR this trait takes 1 generic
|
//~| ERROR trait takes 1 generic
|
||||||
//~| ERROR associated type bindings are not allowed here
|
//~| ERROR associated type bindings are not allowed here
|
||||||
//~| ERROR associated const equality is incomplete
|
//~| ERROR associated const equality is incomplete
|
||||||
fn do_x(&self) -> [u8; 3] {
|
fn do_x(&self) -> [u8; 3] {
|
||||||
|
@ -19,7 +19,7 @@ LL | impl Foo<N = const 3> for Bar {
|
|||||||
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
|
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
|
||||||
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
|
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/issue-89013.rs:9:6
|
--> $DIR/issue-89013.rs:9:6
|
||||||
|
|
|
|
||||||
LL | impl Foo<N = const 3> for Bar {
|
LL | impl Foo<N = const 3> for Bar {
|
||||||
|
@ -15,12 +15,12 @@ enum E<'a, 'b> {
|
|||||||
fn main() {
|
fn main() {
|
||||||
S(&0, &0); // OK
|
S(&0, &0); // OK
|
||||||
S::<'static>(&0, &0);
|
S::<'static>(&0, &0);
|
||||||
//~^ ERROR this struct takes 2 lifetime arguments
|
//~^ ERROR struct takes 2 lifetime arguments
|
||||||
S::<'static, 'static, 'static>(&0, &0);
|
S::<'static, 'static, 'static>(&0, &0);
|
||||||
//~^ ERROR this struct takes 2 lifetime arguments
|
//~^ ERROR struct takes 2 lifetime arguments
|
||||||
E::V(&0); // OK
|
E::V(&0); // OK
|
||||||
E::V::<'static>(&0);
|
E::V::<'static>(&0);
|
||||||
//~^ ERROR this enum takes 2 lifetime arguments
|
//~^ ERROR enum takes 2 lifetime arguments
|
||||||
E::V::<'static, 'static, 'static>(&0);
|
E::V::<'static, 'static, 'static>(&0);
|
||||||
//~^ ERROR this enum takes 2 lifetime arguments
|
//~^ ERROR enum takes 2 lifetime arguments
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/constructor-lifetime-args.rs:17:5
|
--> $DIR/constructor-lifetime-args.rs:17:5
|
||||||
|
|
|
|
||||||
LL | S::<'static>(&0, &0);
|
LL | S::<'static>(&0, &0);
|
||||||
@ -16,7 +16,7 @@ help: add missing lifetime argument
|
|||||||
LL | S::<'static, 'static>(&0, &0);
|
LL | S::<'static, 'static>(&0, &0);
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this struct takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
error[E0107]: struct takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
||||||
--> $DIR/constructor-lifetime-args.rs:19:5
|
--> $DIR/constructor-lifetime-args.rs:19:5
|
||||||
|
|
|
|
||||||
LL | S::<'static, 'static, 'static>(&0, &0);
|
LL | S::<'static, 'static, 'static>(&0, &0);
|
||||||
@ -30,7 +30,7 @@ note: struct defined here, with 2 lifetime parameters: `'a`, `'b`
|
|||||||
LL | struct S<'a, 'b>(&'a u8, &'b u8);
|
LL | struct S<'a, 'b>(&'a u8, &'b u8);
|
||||||
| ^ -- --
|
| ^ -- --
|
||||||
|
|
||||||
error[E0107]: this enum takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: enum takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/constructor-lifetime-args.rs:22:8
|
--> $DIR/constructor-lifetime-args.rs:22:8
|
||||||
|
|
|
|
||||||
LL | E::V::<'static>(&0);
|
LL | E::V::<'static>(&0);
|
||||||
@ -48,7 +48,7 @@ help: add missing lifetime argument
|
|||||||
LL | E::V::<'static, 'static>(&0);
|
LL | E::V::<'static, 'static>(&0);
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this enum takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
error[E0107]: enum takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
||||||
--> $DIR/constructor-lifetime-args.rs:24:8
|
--> $DIR/constructor-lifetime-args.rs:24:8
|
||||||
|
|
|
|
||||||
LL | E::V::<'static, 'static, 'static>(&0);
|
LL | E::V::<'static, 'static, 'static>(&0);
|
||||||
|
5
tests/ui/consts/gate-do-not-const-check.rs
Normal file
5
tests/ui/consts/gate-do-not-const-check.rs
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#[rustc_do_not_const_check]
|
||||||
|
//~^ ERROR this is an internal attribute that will never be stable
|
||||||
|
const fn foo() {}
|
||||||
|
|
||||||
|
fn main() {}
|
11
tests/ui/consts/gate-do-not-const-check.stderr
Normal file
11
tests/ui/consts/gate-do-not-const-check.stderr
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
error[E0658]: this is an internal attribute that will never be stable
|
||||||
|
--> $DIR/gate-do-not-const-check.rs:1:1
|
||||||
|
|
|
||||||
|
LL | #[rustc_do_not_const_check]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
|
||||||
|
|
||||||
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
For more information about this error, try `rustc --explain E0658`.
|
@ -11,39 +11,39 @@ enum Bar {
|
|||||||
|
|
||||||
struct Baz<'a, 'b, 'c> {
|
struct Baz<'a, 'b, 'c> {
|
||||||
buzz: Buzz<'a>,
|
buzz: Buzz<'a>,
|
||||||
//~^ ERROR this struct takes 2 lifetime arguments
|
//~^ ERROR struct takes 2 lifetime arguments
|
||||||
//~| HELP add missing lifetime argument
|
//~| HELP add missing lifetime argument
|
||||||
|
|
||||||
bar: Bar<'a>,
|
bar: Bar<'a>,
|
||||||
//~^ ERROR this enum takes 0 lifetime arguments
|
//~^ ERROR enum takes 0 lifetime arguments
|
||||||
//~| HELP remove these generics
|
//~| HELP remove these generics
|
||||||
|
|
||||||
foo2: Foo<'a, 'b, 'c>,
|
foo2: Foo<'a, 'b, 'c>,
|
||||||
//~^ ERROR this struct takes 1 lifetime argument
|
//~^ ERROR struct takes 1 lifetime argument
|
||||||
//~| HELP remove these lifetime arguments
|
//~| HELP remove these lifetime arguments
|
||||||
|
|
||||||
qux1: Qux<'a, 'b, i32>,
|
qux1: Qux<'a, 'b, i32>,
|
||||||
//~^ ERROR this struct takes 1 lifetime argument
|
//~^ ERROR struct takes 1 lifetime argument
|
||||||
//~| HELP remove this lifetime argument
|
//~| HELP remove this lifetime argument
|
||||||
|
|
||||||
qux2: Qux<'a, i32, 'b>,
|
qux2: Qux<'a, i32, 'b>,
|
||||||
//~^ ERROR this struct takes 1 lifetime argument
|
//~^ ERROR struct takes 1 lifetime argument
|
||||||
//~| HELP remove this lifetime argument
|
//~| HELP remove this lifetime argument
|
||||||
|
|
||||||
qux3: Qux<'a, 'b, 'c, i32>,
|
qux3: Qux<'a, 'b, 'c, i32>,
|
||||||
//~^ ERROR this struct takes 1 lifetime argument
|
//~^ ERROR struct takes 1 lifetime argument
|
||||||
//~| HELP remove these lifetime arguments
|
//~| HELP remove these lifetime arguments
|
||||||
|
|
||||||
qux4: Qux<'a, i32, 'b, 'c>,
|
qux4: Qux<'a, i32, 'b, 'c>,
|
||||||
//~^ ERROR this struct takes 1 lifetime argument
|
//~^ ERROR struct takes 1 lifetime argument
|
||||||
//~| HELP remove these lifetime arguments
|
//~| HELP remove these lifetime arguments
|
||||||
|
|
||||||
qux5: Qux<'a, 'b, i32, 'c>,
|
qux5: Qux<'a, 'b, i32, 'c>,
|
||||||
//~^ ERROR this struct takes 1 lifetime argument
|
//~^ ERROR struct takes 1 lifetime argument
|
||||||
//~| HELP remove this lifetime argument
|
//~| HELP remove this lifetime argument
|
||||||
|
|
||||||
quux: Quux<'a, i32, 'b>,
|
quux: Quux<'a, i32, 'b>,
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments
|
//~^ ERROR struct takes 0 lifetime arguments
|
||||||
//~| HELP remove this lifetime argument
|
//~| HELP remove this lifetime argument
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ pub trait T {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn trait_bound_generic<I: T<u8, u16>>(_i: I) {
|
fn trait_bound_generic<I: T<u8, u16>>(_i: I) {
|
||||||
//~^ ERROR this trait takes 0 generic arguments
|
//~^ ERROR trait takes 0 generic arguments
|
||||||
//~| HELP replace the generic bounds with the associated types
|
//~| HELP replace the generic bounds with the associated types
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/E0107.rs:13:11
|
--> $DIR/E0107.rs:13:11
|
||||||
|
|
|
|
||||||
LL | buzz: Buzz<'a>,
|
LL | buzz: Buzz<'a>,
|
||||||
@ -16,7 +16,7 @@ help: add missing lifetime argument
|
|||||||
LL | buzz: Buzz<'a, 'a>,
|
LL | buzz: Buzz<'a, 'a>,
|
||||||
| ++++
|
| ++++
|
||||||
|
|
||||||
error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/E0107.rs:17:10
|
--> $DIR/E0107.rs:17:10
|
||||||
|
|
|
|
||||||
LL | bar: Bar<'a>,
|
LL | bar: Bar<'a>,
|
||||||
@ -30,7 +30,7 @@ note: enum defined here, with 0 lifetime parameters
|
|||||||
LL | enum Bar {
|
LL | enum Bar {
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
||||||
--> $DIR/E0107.rs:21:11
|
--> $DIR/E0107.rs:21:11
|
||||||
|
|
|
|
||||||
LL | foo2: Foo<'a, 'b, 'c>,
|
LL | foo2: Foo<'a, 'b, 'c>,
|
||||||
@ -44,7 +44,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Foo<'a>(&'a str);
|
LL | struct Foo<'a>(&'a str);
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/E0107.rs:25:11
|
--> $DIR/E0107.rs:25:11
|
||||||
|
|
|
|
||||||
LL | qux1: Qux<'a, 'b, i32>,
|
LL | qux1: Qux<'a, 'b, i32>,
|
||||||
@ -58,7 +58,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Qux<'a, T>(&'a T);
|
LL | struct Qux<'a, T>(&'a T);
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/E0107.rs:29:11
|
--> $DIR/E0107.rs:29:11
|
||||||
|
|
|
|
||||||
LL | qux2: Qux<'a, i32, 'b>,
|
LL | qux2: Qux<'a, i32, 'b>,
|
||||||
@ -72,7 +72,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Qux<'a, T>(&'a T);
|
LL | struct Qux<'a, T>(&'a T);
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
||||||
--> $DIR/E0107.rs:33:11
|
--> $DIR/E0107.rs:33:11
|
||||||
|
|
|
|
||||||
LL | qux3: Qux<'a, 'b, 'c, i32>,
|
LL | qux3: Qux<'a, 'b, 'c, i32>,
|
||||||
@ -86,7 +86,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Qux<'a, T>(&'a T);
|
LL | struct Qux<'a, T>(&'a T);
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
||||||
--> $DIR/E0107.rs:37:11
|
--> $DIR/E0107.rs:37:11
|
||||||
|
|
|
|
||||||
LL | qux4: Qux<'a, i32, 'b, 'c>,
|
LL | qux4: Qux<'a, i32, 'b, 'c>,
|
||||||
@ -100,7 +100,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Qux<'a, T>(&'a T);
|
LL | struct Qux<'a, T>(&'a T);
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 3 lifetime arguments were supplied
|
||||||
--> $DIR/E0107.rs:41:11
|
--> $DIR/E0107.rs:41:11
|
||||||
|
|
|
|
||||||
LL | qux5: Qux<'a, 'b, i32, 'c>,
|
LL | qux5: Qux<'a, 'b, i32, 'c>,
|
||||||
@ -114,7 +114,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Qux<'a, T>(&'a T);
|
LL | struct Qux<'a, T>(&'a T);
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 lifetime arguments but 2 lifetime arguments were supplied
|
error[E0107]: struct takes 0 lifetime arguments but 2 lifetime arguments were supplied
|
||||||
--> $DIR/E0107.rs:45:11
|
--> $DIR/E0107.rs:45:11
|
||||||
|
|
|
|
||||||
LL | quux: Quux<'a, i32, 'b>,
|
LL | quux: Quux<'a, i32, 'b>,
|
||||||
@ -128,7 +128,7 @@ note: struct defined here, with 0 lifetime parameters
|
|||||||
LL | struct Quux<T>(T);
|
LL | struct Quux<T>(T);
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 generic arguments but 2 generic arguments were supplied
|
error[E0107]: trait takes 0 generic arguments but 2 generic arguments were supplied
|
||||||
--> $DIR/E0107.rs:55:27
|
--> $DIR/E0107.rs:55:27
|
||||||
|
|
|
|
||||||
LL | fn trait_bound_generic<I: T<u8, u16>>(_i: I) {
|
LL | fn trait_bound_generic<I: T<u8, u16>>(_i: I) {
|
||||||
|
@ -4,16 +4,23 @@
|
|||||||
// If this recovery happens, then plenty of errors are emitted. Here, we expect
|
// If this recovery happens, then plenty of errors are emitted. Here, we expect
|
||||||
// only one error.
|
// only one error.
|
||||||
//
|
//
|
||||||
// This is part of issue #88065:
|
// This is part of the following issues:
|
||||||
// https://github.com/rust-lang/rust/issues/88065
|
// https://github.com/rust-lang/rust/issues/88065
|
||||||
|
// https://github.com/rust-lang/rust/issues/107959
|
||||||
|
|
||||||
// run-rustfix
|
// run-rustfix
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
// Closure with multiple expressions delimited by semicolon.
|
||||||
let num = 5;
|
let num = 5;
|
||||||
(1..num).reduce(|a, b| {
|
(1..num).reduce(|a, b| {
|
||||||
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
|
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
|
||||||
println!("{}", a);
|
println!("{}", a);
|
||||||
a * b
|
a * b
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
|
|
||||||
|
// Closure with a single expression ended by a semicolon.
|
||||||
|
let mut v = vec![1, 2, 3];
|
||||||
|
v.iter_mut().for_each(|x| {*x = *x+1;});
|
||||||
|
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
|
||||||
}
|
}
|
||||||
|
@ -4,16 +4,23 @@
|
|||||||
// If this recovery happens, then plenty of errors are emitted. Here, we expect
|
// If this recovery happens, then plenty of errors are emitted. Here, we expect
|
||||||
// only one error.
|
// only one error.
|
||||||
//
|
//
|
||||||
// This is part of issue #88065:
|
// This is part of the following issues:
|
||||||
// https://github.com/rust-lang/rust/issues/88065
|
// https://github.com/rust-lang/rust/issues/88065
|
||||||
|
// https://github.com/rust-lang/rust/issues/107959
|
||||||
|
|
||||||
// run-rustfix
|
// run-rustfix
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
// Closure with multiple expressions delimited by semicolon.
|
||||||
let num = 5;
|
let num = 5;
|
||||||
(1..num).reduce(|a, b|
|
(1..num).reduce(|a, b|
|
||||||
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
|
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
|
||||||
println!("{}", a);
|
println!("{}", a);
|
||||||
a * b
|
a * b
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
|
// Closure with a single expression ended by a semicolon.
|
||||||
|
let mut v = vec![1, 2, 3];
|
||||||
|
v.iter_mut().for_each(|x|*x = *x+1;);
|
||||||
|
//~^ ERROR: closure bodies that contain statements must be surrounded by braces
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
error: closure bodies that contain statements must be surrounded by braces
|
error: closure bodies that contain statements must be surrounded by braces
|
||||||
--> $DIR/missing_braces_around_block.rs:14:26
|
--> $DIR/missing_braces_around_block.rs:16:26
|
||||||
|
|
|
|
||||||
LL | (1..num).reduce(|a, b|
|
LL | (1..num).reduce(|a, b|
|
||||||
| ^
|
| ^
|
||||||
@ -8,14 +8,14 @@ LL | ).unwrap();
|
|||||||
| ^
|
| ^
|
||||||
|
|
|
|
||||||
note: statement found outside of a block
|
note: statement found outside of a block
|
||||||
--> $DIR/missing_braces_around_block.rs:16:26
|
--> $DIR/missing_braces_around_block.rs:18:26
|
||||||
|
|
|
|
||||||
LL | println!("{}", a);
|
LL | println!("{}", a);
|
||||||
| -----------------^ this `;` turns the preceding closure into a statement
|
| -----------------^ this `;` turns the preceding closure into a statement
|
||||||
| |
|
| |
|
||||||
| this expression is a statement because of the trailing semicolon
|
| this expression is a statement because of the trailing semicolon
|
||||||
note: the closure body may be incorrectly delimited
|
note: the closure body may be incorrectly delimited
|
||||||
--> $DIR/missing_braces_around_block.rs:14:21
|
--> $DIR/missing_braces_around_block.rs:16:21
|
||||||
|
|
|
|
||||||
LL | (1..num).reduce(|a, b|
|
LL | (1..num).reduce(|a, b|
|
||||||
| _____________________^
|
| _____________________^
|
||||||
@ -34,5 +34,30 @@ LL | a * b
|
|||||||
LL ~ }).unwrap();
|
LL ~ }).unwrap();
|
||||||
|
|
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: closure bodies that contain statements must be surrounded by braces
|
||||||
|
--> $DIR/missing_braces_around_block.rs:24:29
|
||||||
|
|
|
||||||
|
LL | v.iter_mut().for_each(|x|*x = *x+1;);
|
||||||
|
| ^ ^
|
||||||
|
|
|
||||||
|
note: statement found outside of a block
|
||||||
|
--> $DIR/missing_braces_around_block.rs:24:39
|
||||||
|
|
|
||||||
|
LL | v.iter_mut().for_each(|x|*x = *x+1;);
|
||||||
|
| ---------^ this `;` turns the preceding closure into a statement
|
||||||
|
| |
|
||||||
|
| this expression is a statement because of the trailing semicolon
|
||||||
|
note: the closure body may be incorrectly delimited
|
||||||
|
--> $DIR/missing_braces_around_block.rs:24:27
|
||||||
|
|
|
||||||
|
LL | v.iter_mut().for_each(|x|*x = *x+1;);
|
||||||
|
| ^^^^^^^^^^^^ - ...but likely you meant the closure to end here
|
||||||
|
| |
|
||||||
|
| this is the parsed closure...
|
||||||
|
help: try adding braces
|
||||||
|
|
|
||||||
|
LL | v.iter_mut().for_each(|x| {*x = *x+1;});
|
||||||
|
| + +
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
@ -5,12 +5,12 @@ trait X {
|
|||||||
fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||||
//~^ ERROR: lifetime in trait object type must be followed by `+`
|
//~^ ERROR: lifetime in trait object type must be followed by `+`
|
||||||
//~| ERROR: parenthesized generic arguments cannot be used
|
//~| ERROR: parenthesized generic arguments cannot be used
|
||||||
//~| ERROR this associated type takes 0 generic arguments but 1 generic argument
|
//~| ERROR associated type takes 0 generic arguments but 1 generic argument
|
||||||
//~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
|
//~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
|
||||||
|
|
||||||
|
|
||||||
fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
|
fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
|
||||||
//~^ ERROR: parenthesized generic arguments cannot be used
|
//~^ ERROR: parenthesized generic arguments cannot be used
|
||||||
//~| ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
|
//~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -23,7 +23,7 @@ LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
|
|||||||
| |
|
| |
|
||||||
| help: remove these parentheses
|
| help: remove these parentheses
|
||||||
|
|
||||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
||||||
|
|
|
|
||||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||||
@ -39,7 +39,7 @@ help: add missing lifetime argument
|
|||||||
LL | fn foo<'a>(arg: Box<dyn X<Y('_, 'a) = &'a ()>>) {}
|
LL | fn foo<'a>(arg: Box<dyn X<Y('_, 'a) = &'a ()>>) {}
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
--> $DIR/gat-trait-path-parenthesised-args.rs:5:27
|
||||||
|
|
|
|
||||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||||
@ -53,7 +53,7 @@ note: associated type defined here, with 0 generic parameters
|
|||||||
LL | type Y<'a>;
|
LL | type Y<'a>;
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||||
--> $DIR/gat-trait-path-parenthesised-args.rs:12:27
|
--> $DIR/gat-trait-path-parenthesised-args.rs:12:27
|
||||||
|
|
|
|
||||||
LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
|
LL | fn bar<'a>(arg: Box<dyn X<Y() = ()>>) {}
|
||||||
|
@ -12,9 +12,9 @@ fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
|
|||||||
//~^ ERROR missing generics for associated type
|
//~^ ERROR missing generics for associated type
|
||||||
|
|
||||||
fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
|
fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
|
||||||
//~^ ERROR this struct takes 3 lifetime arguments but 2 lifetime
|
//~^ ERROR struct takes 3 lifetime arguments but 2 lifetime
|
||||||
|
|
||||||
fn f<'a>(_arg: Foo<'a>) {}
|
fn f<'a>(_arg: Foo<'a>) {}
|
||||||
//~^ ERROR this struct takes 3 lifetime arguments but 1 lifetime
|
//~^ ERROR struct takes 3 lifetime arguments but 1 lifetime
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -14,7 +14,7 @@ help: add missing lifetime arguments
|
|||||||
LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'_, '_> = (&'c u32, &'d u32)>>) {}
|
LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'_, '_> = (&'c u32, &'d u32)>>) {}
|
||||||
| ++++++++
|
| ++++++++
|
||||||
|
|
||||||
error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied
|
error[E0107]: struct takes 3 lifetime arguments but 2 lifetime arguments were supplied
|
||||||
--> $DIR/missing_lifetime_args.rs:14:26
|
--> $DIR/missing_lifetime_args.rs:14:26
|
||||||
|
|
|
|
||||||
LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
|
LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
|
||||||
@ -32,7 +32,7 @@ help: add missing lifetime argument
|
|||||||
LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {}
|
LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {}
|
||||||
| ++++
|
| ++++
|
||||||
|
|
||||||
error[E0107]: this struct takes 3 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 3 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing_lifetime_args.rs:17:16
|
--> $DIR/missing_lifetime_args.rs:17:16
|
||||||
|
|
|
|
||||||
LL | fn f<'a>(_arg: Foo<'a>) {}
|
LL | fn f<'a>(_arg: Foo<'a>) {}
|
||||||
|
@ -4,7 +4,7 @@ trait Foo {
|
|||||||
|
|
||||||
fn foo<T: Foo>() {
|
fn foo<T: Foo>() {
|
||||||
let _: <T as Foo>::Assoc<3>;
|
let _: <T as Foo>::Assoc<3>;
|
||||||
//~^ ERROR this associated type
|
//~^ ERROR associated type
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||||
--> $DIR/missing_lifetime_const.rs:6:24
|
--> $DIR/missing_lifetime_const.rs:6:24
|
||||||
|
|
|
|
||||||
LL | let _: <T as Foo>::Assoc<3>;
|
LL | let _: <T as Foo>::Assoc<3>;
|
||||||
|
@ -9,10 +9,10 @@ trait Foo {
|
|||||||
// Test parameters in default values
|
// Test parameters in default values
|
||||||
type FOk<T> = Self::E<'static, T>;
|
type FOk<T> = Self::E<'static, T>;
|
||||||
type FErr1 = Self::E<'static, 'static>;
|
type FErr1 = Self::E<'static, 'static>;
|
||||||
//~^ ERROR this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR associated type takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
//~| ERROR this associated type takes 1
|
//~| ERROR associated type takes 1
|
||||||
type FErr2<T> = Self::E<'static, T, u32>;
|
type FErr2<T> = Self::E<'static, T, u32>;
|
||||||
//~^ ERROR this associated type takes 1
|
//~^ ERROR associated type takes 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: associated type takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/parameter_number_and_kind.rs:11:24
|
--> $DIR/parameter_number_and_kind.rs:11:24
|
||||||
|
|
|
|
||||||
LL | type FErr1 = Self::E<'static, 'static>;
|
LL | type FErr1 = Self::E<'static, 'static>;
|
||||||
@ -12,7 +12,7 @@ note: associated type defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | type E<'a, T>;
|
LL | type E<'a, T>;
|
||||||
| ^ --
|
| ^ --
|
||||||
|
|
||||||
error[E0107]: this associated type takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: associated type takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/parameter_number_and_kind.rs:11:24
|
--> $DIR/parameter_number_and_kind.rs:11:24
|
||||||
|
|
|
|
||||||
LL | type FErr1 = Self::E<'static, 'static>;
|
LL | type FErr1 = Self::E<'static, 'static>;
|
||||||
@ -28,7 +28,7 @@ help: add missing generic argument
|
|||||||
LL | type FErr1 = Self::E<'static, 'static, T>;
|
LL | type FErr1 = Self::E<'static, 'static, T>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this associated type takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: associated type takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/parameter_number_and_kind.rs:14:27
|
--> $DIR/parameter_number_and_kind.rs:14:27
|
||||||
|
|
|
|
||||||
LL | type FErr2<T> = Self::E<'static, T, u32>;
|
LL | type FErr2<T> = Self::E<'static, T, u32>;
|
||||||
|
@ -4,8 +4,8 @@ trait X {
|
|||||||
|
|
||||||
const _: () = {
|
const _: () = {
|
||||||
fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||||
//~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
|
//~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
|
||||||
//~| ERROR this associated type takes 0 generic arguments but 1 generic argument
|
//~| ERROR associated type takes 0 generic arguments but 1 generic argument
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
||||||
|
|
|
|
||||||
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||||
@ -14,7 +14,7 @@ help: add missing lifetime argument
|
|||||||
LL | fn f2<'a>(arg : Box<dyn X<Y<'_, 1> = &'a ()>>) {}
|
LL | fn f2<'a>(arg : Box<dyn X<Y<'_, 1> = &'a ()>>) {}
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
--> $DIR/trait-path-type-error-once-implemented.rs:6:29
|
||||||
|
|
|
|
||||||
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
LL | fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
|
||||||
|
@ -28,17 +28,17 @@ impl Trait<isize> for S2 {
|
|||||||
|
|
||||||
fn foo<'a>() {
|
fn foo<'a>() {
|
||||||
let _ = S::new::<isize,f64>(1, 1.0);
|
let _ = S::new::<isize,f64>(1, 1.0);
|
||||||
//~^ ERROR this associated function takes 1
|
//~^ ERROR associated function takes 1
|
||||||
|
|
||||||
let _ = S::<'a,isize>::new::<f64>(1, 1.0);
|
let _ = S::<'a,isize>::new::<f64>(1, 1.0);
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
|
|
||||||
let _: S2 = Trait::new::<isize,f64>(1, 1.0);
|
let _: S2 = Trait::new::<isize,f64>(1, 1.0);
|
||||||
//~^ ERROR this associated function takes 1
|
//~^ ERROR associated function takes 1
|
||||||
|
|
||||||
let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
||||||
//~^ ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this associated function takes 1
|
//~| ERROR associated function takes 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/bad-mid-path-type-params.rs:30:16
|
--> $DIR/bad-mid-path-type-params.rs:30:16
|
||||||
|
|
|
|
||||||
LL | let _ = S::new::<isize,f64>(1, 1.0);
|
LL | let _ = S::new::<isize,f64>(1, 1.0);
|
||||||
@ -12,7 +12,7 @@ note: associated function defined here, with 1 generic parameter: `U`
|
|||||||
LL | fn new<U>(x: T, _: U) -> S<T> {
|
LL | fn new<U>(x: T, _: U) -> S<T> {
|
||||||
| ^^^ -
|
| ^^^ -
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/bad-mid-path-type-params.rs:33:13
|
--> $DIR/bad-mid-path-type-params.rs:33:13
|
||||||
|
|
|
|
||||||
LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0);
|
LL | let _ = S::<'a,isize>::new::<f64>(1, 1.0);
|
||||||
@ -26,7 +26,7 @@ note: struct defined here, with 0 lifetime parameters
|
|||||||
LL | struct S<T> {
|
LL | struct S<T> {
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/bad-mid-path-type-params.rs:36:24
|
--> $DIR/bad-mid-path-type-params.rs:36:24
|
||||||
|
|
|
|
||||||
LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0);
|
LL | let _: S2 = Trait::new::<isize,f64>(1, 1.0);
|
||||||
@ -40,7 +40,7 @@ note: associated function defined here, with 1 generic parameter: `U`
|
|||||||
LL | fn new<U>(x: T, y: U) -> Self;
|
LL | fn new<U>(x: T, y: U) -> Self;
|
||||||
| ^^^ -
|
| ^^^ -
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/bad-mid-path-type-params.rs:39:17
|
--> $DIR/bad-mid-path-type-params.rs:39:17
|
||||||
|
|
|
|
||||||
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
||||||
@ -54,7 +54,7 @@ note: trait defined here, with 0 lifetime parameters
|
|||||||
LL | trait Trait<T> {
|
LL | trait Trait<T> {
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error[E0107]: this associated function takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: associated function takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/bad-mid-path-type-params.rs:39:36
|
--> $DIR/bad-mid-path-type-params.rs:39:36
|
||||||
|
|
|
|
||||||
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
LL | let _: S2 = Trait::<'a,isize>::new::<f64,f64>(1, 1.0);
|
||||||
|
@ -4,9 +4,9 @@ struct Bar<'a>(&'a ());
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
Foo::<'static, 'static, ()>(&0);
|
Foo::<'static, 'static, ()>(&0);
|
||||||
//~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
|
|
||||||
Bar::<'static, 'static, ()>(&());
|
Bar::<'static, 'static, ()>(&());
|
||||||
//~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
//~| ERROR this struct takes 0
|
//~| ERROR struct takes 0
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/generic-arg-mismatch-recover.rs:6:5
|
--> $DIR/generic-arg-mismatch-recover.rs:6:5
|
||||||
|
|
|
|
||||||
LL | Foo::<'static, 'static, ()>(&0);
|
LL | Foo::<'static, 'static, ()>(&0);
|
||||||
@ -12,7 +12,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Foo<'a, T: 'a>(&'a T);
|
LL | struct Foo<'a, T: 'a>(&'a T);
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/generic-arg-mismatch-recover.rs:9:5
|
--> $DIR/generic-arg-mismatch-recover.rs:9:5
|
||||||
|
|
|
|
||||||
LL | Bar::<'static, 'static, ()>(&());
|
LL | Bar::<'static, 'static, ()>(&());
|
||||||
@ -26,7 +26,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Bar<'a>(&'a ());
|
LL | struct Bar<'a>(&'a ());
|
||||||
| ^^^ --
|
| ^^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/generic-arg-mismatch-recover.rs:9:5
|
--> $DIR/generic-arg-mismatch-recover.rs:9:5
|
||||||
|
|
|
|
||||||
LL | Bar::<'static, 'static, ()>(&());
|
LL | Bar::<'static, 'static, ()>(&());
|
||||||
|
@ -9,5 +9,5 @@ impl<A, B, C> Foo<A, B, C> {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
Foo::<isize>::new();
|
Foo::<isize>::new();
|
||||||
//~^ ERROR this struct takes at least 2 generic arguments but 1 generic argument
|
//~^ ERROR struct takes at least 2 generic arguments but 1 generic argument
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes at least 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/generic-impl-less-params-with-defaults.rs:11:5
|
--> $DIR/generic-impl-less-params-with-defaults.rs:11:5
|
||||||
|
|
|
|
||||||
LL | Foo::<isize>::new();
|
LL | Foo::<isize>::new();
|
||||||
|
@ -11,5 +11,5 @@ impl<T, A> Vec<T, A> {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
Vec::<isize, Heap, bool>::new();
|
Vec::<isize, Heap, bool>::new();
|
||||||
//~^ ERROR this struct takes at most 2 generic arguments but 3 generic arguments were supplied
|
//~^ ERROR struct takes at most 2 generic arguments but 3 generic arguments were supplied
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes at most 2 generic arguments but 3 generic arguments were supplied
|
error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments were supplied
|
||||||
--> $DIR/generic-impl-more-params-with-defaults.rs:13:5
|
--> $DIR/generic-impl-more-params-with-defaults.rs:13:5
|
||||||
|
|
|
|
||||||
LL | Vec::<isize, Heap, bool>::new();
|
LL | Vec::<isize, Heap, bool>::new();
|
||||||
|
@ -7,5 +7,5 @@ struct Vec<T, A = Heap>(
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let _: Vec<isize, Heap, bool>;
|
let _: Vec<isize, Heap, bool>;
|
||||||
//~^ ERROR this struct takes at most 2 generic arguments but 3 generic arguments
|
//~^ ERROR struct takes at most 2 generic arguments but 3 generic arguments
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes at most 2 generic arguments but 3 generic arguments were supplied
|
error[E0107]: struct takes at most 2 generic arguments but 3 generic arguments were supplied
|
||||||
--> $DIR/generic-type-more-params-with-defaults.rs:9:12
|
--> $DIR/generic-type-more-params-with-defaults.rs:9:12
|
||||||
|
|
|
|
||||||
LL | let _: Vec<isize, Heap, bool>;
|
LL | let _: Vec<isize, Heap, bool>;
|
||||||
|
@ -4,18 +4,18 @@ mod no_generics {
|
|||||||
type A = Ty;
|
type A = Ty;
|
||||||
|
|
||||||
type B = Ty<'static>;
|
type B = Ty<'static>;
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument
|
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument
|
||||||
//~| HELP remove these generics
|
//~| HELP remove these generics
|
||||||
|
|
||||||
type C = Ty<'static, usize>;
|
type C = Ty<'static, usize>;
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument
|
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument
|
||||||
//~| ERROR this struct takes 0 generic arguments but 1 generic argument
|
//~| ERROR struct takes 0 generic arguments but 1 generic argument
|
||||||
//~| HELP remove this lifetime argument
|
//~| HELP remove this lifetime argument
|
||||||
//~| HELP remove this generic argument
|
//~| HELP remove this generic argument
|
||||||
|
|
||||||
type D = Ty<'static, usize, { 0 }>;
|
type D = Ty<'static, usize, { 0 }>;
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument
|
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument
|
||||||
//~| ERROR this struct takes 0 generic arguments but 2 generic arguments
|
//~| ERROR struct takes 0 generic arguments but 2 generic arguments
|
||||||
//~| HELP remove this lifetime argument
|
//~| HELP remove this lifetime argument
|
||||||
//~| HELP remove these generic arguments
|
//~| HELP remove these generic arguments
|
||||||
}
|
}
|
||||||
@ -28,17 +28,17 @@ mod type_and_type {
|
|||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type B = Ty<usize>;
|
type B = Ty<usize>;
|
||||||
//~^ ERROR this struct takes 2 generic arguments but 1 generic argument
|
//~^ ERROR struct takes 2 generic arguments but 1 generic argument
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = Ty<usize, String>;
|
type C = Ty<usize, String>;
|
||||||
|
|
||||||
type D = Ty<usize, String, char>;
|
type D = Ty<usize, String, char>;
|
||||||
//~^ ERROR this struct takes 2 generic arguments but 3 generic arguments
|
//~^ ERROR struct takes 2 generic arguments but 3 generic arguments
|
||||||
//~| HELP remove this
|
//~| HELP remove this
|
||||||
|
|
||||||
type E = Ty<>;
|
type E = Ty<>;
|
||||||
//~^ ERROR this struct takes 2 generic arguments but 0 generic arguments were supplied
|
//~^ ERROR struct takes 2 generic arguments but 0 generic arguments were supplied
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ mod lifetime_and_type {
|
|||||||
//~| HELP consider introducing
|
//~| HELP consider introducing
|
||||||
|
|
||||||
type B = Ty<'static>;
|
type B = Ty<'static>;
|
||||||
//~^ ERROR this struct takes 1 generic argument but 0 generic arguments
|
//~^ ERROR struct takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = Ty<usize>;
|
type C = Ty<usize>;
|
||||||
@ -62,14 +62,14 @@ mod lifetime_and_type {
|
|||||||
type D = Ty<'static, usize>;
|
type D = Ty<'static, usize>;
|
||||||
|
|
||||||
type E = Ty<>;
|
type E = Ty<>;
|
||||||
//~^ ERROR this struct takes 1 generic argument but 0 generic arguments
|
//~^ ERROR struct takes 1 generic argument but 0 generic arguments
|
||||||
//~| ERROR missing lifetime specifier
|
//~| ERROR missing lifetime specifier
|
||||||
//~| HELP consider introducing
|
//~| HELP consider introducing
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type F = Ty<'static, usize, 'static, usize>;
|
type F = Ty<'static, usize, 'static, usize>;
|
||||||
//~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments
|
//~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments
|
||||||
//~| ERROR this struct takes 1 generic argument but 2 generic arguments
|
//~| ERROR struct takes 1 generic argument but 2 generic arguments
|
||||||
//~| HELP remove this lifetime argument
|
//~| HELP remove this lifetime argument
|
||||||
//~| HELP remove this generic argument
|
//~| HELP remove this generic argument
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ mod type_and_type_and_type {
|
|||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type B = Ty<usize>;
|
type B = Ty<usize>;
|
||||||
//~^ ERROR this struct takes at least 2
|
//~^ ERROR struct takes at least 2
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = Ty<usize, String>;
|
type C = Ty<usize, String>;
|
||||||
@ -90,11 +90,11 @@ mod type_and_type_and_type {
|
|||||||
type D = Ty<usize, String, char>;
|
type D = Ty<usize, String, char>;
|
||||||
|
|
||||||
type E = Ty<usize, String, char, f64>;
|
type E = Ty<usize, String, char, f64>;
|
||||||
//~^ ERROR this struct takes at most 3
|
//~^ ERROR struct takes at most 3
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type F = Ty<>;
|
type F = Ty<>;
|
||||||
//~^ ERROR this struct takes at least 2 generic arguments but 0 generic arguments
|
//~^ ERROR struct takes at least 2 generic arguments but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ mod r#trait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type A = Box<dyn NonGeneric<usize>>;
|
type A = Box<dyn NonGeneric<usize>>;
|
||||||
//~^ ERROR this trait takes 0 generic arguments but 1 generic argument
|
//~^ ERROR trait takes 0 generic arguments but 1 generic argument
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type B = Box<dyn GenericLifetime>;
|
type B = Box<dyn GenericLifetime>;
|
||||||
@ -123,7 +123,7 @@ mod r#trait {
|
|||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
|
|
||||||
type C = Box<dyn GenericLifetime<'static, 'static>>;
|
type C = Box<dyn GenericLifetime<'static, 'static>>;
|
||||||
//~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type D = Box<dyn GenericType>;
|
type D = Box<dyn GenericType>;
|
||||||
@ -131,7 +131,7 @@ mod r#trait {
|
|||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type E = Box<dyn GenericType<String, usize>>;
|
type E = Box<dyn GenericType<String, usize>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 2 generic arguments
|
//~^ ERROR trait takes 1 generic argument but 2 generic arguments
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type F = Box<dyn GenericLifetime<>>;
|
type F = Box<dyn GenericLifetime<>>;
|
||||||
@ -140,7 +140,7 @@ mod r#trait {
|
|||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
|
|
||||||
type G = Box<dyn GenericType<>>;
|
type G = Box<dyn GenericType<>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 0 generic arguments
|
//~^ ERROR trait takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ mod associated_item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
|
type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 0 generic arguments but 1 generic argument
|
//~^ ERROR trait takes 0 generic arguments but 1 generic argument
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,14 +166,14 @@ mod associated_item {
|
|||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
|
|
||||||
type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
|
type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
|
type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
|
||||||
//~^ ERROR missing lifetime specifier
|
//~^ ERROR missing lifetime specifier
|
||||||
//~| HELP consider introducing
|
//~| HELP consider introducing
|
||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
//~| ERROR this trait takes 0 generic arguments but 1 generic argument
|
//~| ERROR trait takes 0 generic arguments but 1 generic argument
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,17 +183,17 @@ mod associated_item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type A = Box<dyn GenericTypeAT<AssocTy=()>>;
|
type A = Box<dyn GenericTypeAT<AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 0 generic arguments
|
//~^ ERROR trait takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
|
type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 2 generic arguments
|
//~^ ERROR trait takes 1 generic argument but 2 generic arguments
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
|
type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 0 generic arguments
|
//~^ ERROR trait takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
//~| ERROR this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,20 +203,20 @@ mod associated_item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type A = Box<dyn GenericLifetimeTypeAT<AssocTy=()>>;
|
type A = Box<dyn GenericLifetimeTypeAT<AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 0 generic arguments
|
//~^ ERROR trait takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
//~| ERROR missing lifetime specifier
|
//~| ERROR missing lifetime specifier
|
||||||
//~| HELP consider introducing
|
//~| HELP consider introducing
|
||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
|
|
||||||
type B = Box<dyn GenericLifetimeTypeAT<'static, AssocTy=()>>;
|
type B = Box<dyn GenericLifetimeTypeAT<'static, AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 0 generic arguments were supplied
|
//~^ ERROR trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
//~| ERROR this trait takes 1 generic argument but 0 generic arguments
|
//~| ERROR trait takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type D = Box<dyn GenericLifetimeTypeAT<(), AssocTy=()>>;
|
type D = Box<dyn GenericLifetimeTypeAT<(), AssocTy=()>>;
|
||||||
@ -228,21 +228,21 @@ mod associated_item {
|
|||||||
//~^ ERROR missing lifetime specifier
|
//~^ ERROR missing lifetime specifier
|
||||||
//~| HELP consider introducing
|
//~| HELP consider introducing
|
||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
//~| ERROR this trait takes 1 generic argument but 2 generic arguments
|
//~| ERROR trait takes 1 generic argument but 2 generic arguments
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
|
type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
|
type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 generic argument but 2 generic arguments
|
//~^ ERROR trait takes 1 generic argument but 2 generic arguments
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ ERROR trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
//~| ERROR this trait takes 1 generic argument but 2 generic arguments
|
//~| ERROR trait takes 1 generic argument but 2 generic arguments
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,15 +252,15 @@ mod associated_item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type A = Box<dyn GenericTypeTypeAT<AssocTy=()>>;
|
type A = Box<dyn GenericTypeTypeAT<AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 2 generic arguments but 0 generic arguments
|
//~^ ERROR trait takes 2 generic arguments but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type B = Box<dyn GenericTypeTypeAT<(), AssocTy=()>>;
|
type B = Box<dyn GenericTypeTypeAT<(), AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 2 generic arguments but 1 generic argument
|
//~^ ERROR trait takes 2 generic arguments but 1 generic argument
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
|
type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 2 generic arguments but 3 generic arguments
|
//~^ ERROR trait takes 2 generic arguments but 3 generic arguments
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ mod associated_item {
|
|||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
|
|
||||||
type B = Box<dyn GenericLifetimeLifetimeAT<'static, AssocTy=()>>;
|
type B = Box<dyn GenericLifetimeLifetimeAT<'static, AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| HELP add missing lifetime argument
|
//~| HELP add missing lifetime argument
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,17 +288,17 @@ mod associated_item {
|
|||||||
//~^ ERROR missing lifetime specifier
|
//~^ ERROR missing lifetime specifier
|
||||||
//~| HELP consider introducing
|
//~| HELP consider introducing
|
||||||
//~| HELP consider making the bound lifetime-generic
|
//~| HELP consider making the bound lifetime-generic
|
||||||
//~| ERROR this trait takes 1 generic argument but 0 generic arguments
|
//~| ERROR trait takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, AssocTy=()>>;
|
type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| HELP add missing lifetime argument
|
//~| HELP add missing lifetime argument
|
||||||
//~| ERROR this trait takes 1 generic argument but 0 generic arguments
|
//~| ERROR trait takes 1 generic argument but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = Box<dyn GenericLifetimeLifetimeTypeAT<'static, (), AssocTy=()>>;
|
type C = Box<dyn GenericLifetimeLifetimeTypeAT<'static, (), AssocTy=()>>;
|
||||||
//~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| HELP add missing lifetime argument
|
//~| HELP add missing lifetime argument
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -312,21 +312,21 @@ mod stdlib {
|
|||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type B = HashMap<String>;
|
type B = HashMap<String>;
|
||||||
//~^ ERROR this struct takes at least
|
//~^ ERROR struct takes at least
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = HashMap<'static>;
|
type C = HashMap<'static>;
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument
|
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument
|
||||||
//~| HELP remove these generics
|
//~| HELP remove these generics
|
||||||
//~| ERROR this struct takes at least 2
|
//~| ERROR struct takes at least 2
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type D = HashMap<usize, String, char, f64>;
|
type D = HashMap<usize, String, char, f64>;
|
||||||
//~^ ERROR this struct takes at most 3
|
//~^ ERROR struct takes at most 3
|
||||||
//~| HELP remove this
|
//~| HELP remove this
|
||||||
|
|
||||||
type E = HashMap<>;
|
type E = HashMap<>;
|
||||||
//~^ ERROR this struct takes at least 2 generic arguments but 0 generic arguments
|
//~^ ERROR struct takes at least 2 generic arguments but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,21 +336,21 @@ mod stdlib {
|
|||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type B = Result<String>;
|
type B = Result<String>;
|
||||||
//~^ ERROR this enum takes 2 generic arguments but 1 generic argument
|
//~^ ERROR enum takes 2 generic arguments but 1 generic argument
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type C = Result<'static>;
|
type C = Result<'static>;
|
||||||
//~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument
|
//~^ ERROR enum takes 0 lifetime arguments but 1 lifetime argument
|
||||||
//~| HELP remove these generics
|
//~| HELP remove these generics
|
||||||
//~| ERROR this enum takes 2 generic arguments but 0 generic arguments
|
//~| ERROR enum takes 2 generic arguments but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
|
|
||||||
type D = Result<usize, String, char>;
|
type D = Result<usize, String, char>;
|
||||||
//~^ ERROR this enum takes 2 generic arguments but 3 generic arguments
|
//~^ ERROR enum takes 2 generic arguments but 3 generic arguments
|
||||||
//~| HELP remove
|
//~| HELP remove
|
||||||
|
|
||||||
type E = Result<>;
|
type E = Result<>;
|
||||||
//~^ ERROR this enum takes 2 generic arguments but 0 generic arguments
|
//~^ ERROR enum takes 2 generic arguments but 0 generic arguments
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ help: consider introducing a named lifetime parameter
|
|||||||
LL | type A<'a> = Box<dyn GenericLifetimeLifetimeTypeAT<'a, 'a, AssocTy=()>>;
|
LL | type A<'a> = Box<dyn GenericLifetimeLifetimeTypeAT<'a, 'a, AssocTy=()>>;
|
||||||
| ++++ +++++++
|
| ++++ +++++++
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:6:14
|
--> $DIR/wrong-number-of-args.rs:6:14
|
||||||
|
|
|
|
||||||
LL | type B = Ty<'static>;
|
LL | type B = Ty<'static>;
|
||||||
@ -181,7 +181,7 @@ note: struct defined here, with 0 lifetime parameters
|
|||||||
LL | struct Ty;
|
LL | struct Ty;
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:10:14
|
--> $DIR/wrong-number-of-args.rs:10:14
|
||||||
|
|
|
|
||||||
LL | type C = Ty<'static, usize>;
|
LL | type C = Ty<'static, usize>;
|
||||||
@ -195,7 +195,7 @@ note: struct defined here, with 0 lifetime parameters
|
|||||||
LL | struct Ty;
|
LL | struct Ty;
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:10:14
|
--> $DIR/wrong-number-of-args.rs:10:14
|
||||||
|
|
|
|
||||||
LL | type C = Ty<'static, usize>;
|
LL | type C = Ty<'static, usize>;
|
||||||
@ -209,7 +209,7 @@ note: struct defined here, with 0 generic parameters
|
|||||||
LL | struct Ty;
|
LL | struct Ty;
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:16:14
|
--> $DIR/wrong-number-of-args.rs:16:14
|
||||||
|
|
|
|
||||||
LL | type D = Ty<'static, usize, { 0 }>;
|
LL | type D = Ty<'static, usize, { 0 }>;
|
||||||
@ -223,7 +223,7 @@ note: struct defined here, with 0 lifetime parameters
|
|||||||
LL | struct Ty;
|
LL | struct Ty;
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 generic arguments but 2 generic arguments were supplied
|
error[E0107]: struct takes 0 generic arguments but 2 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:16:14
|
--> $DIR/wrong-number-of-args.rs:16:14
|
||||||
|
|
|
|
||||||
LL | type D = Ty<'static, usize, { 0 }>;
|
LL | type D = Ty<'static, usize, { 0 }>;
|
||||||
@ -253,7 +253,7 @@ help: add missing generic arguments
|
|||||||
LL | type A = Ty<A, B>;
|
LL | type A = Ty<A, B>;
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
||||||
error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:30:14
|
--> $DIR/wrong-number-of-args.rs:30:14
|
||||||
|
|
|
|
||||||
LL | type B = Ty<usize>;
|
LL | type B = Ty<usize>;
|
||||||
@ -271,7 +271,7 @@ help: add missing generic argument
|
|||||||
LL | type B = Ty<usize, B>;
|
LL | type B = Ty<usize, B>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this struct takes 2 generic arguments but 3 generic arguments were supplied
|
error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:36:14
|
--> $DIR/wrong-number-of-args.rs:36:14
|
||||||
|
|
|
|
||||||
LL | type D = Ty<usize, String, char>;
|
LL | type D = Ty<usize, String, char>;
|
||||||
@ -285,7 +285,7 @@ note: struct defined here, with 2 generic parameters: `A`, `B`
|
|||||||
LL | struct Ty<A, B>;
|
LL | struct Ty<A, B>;
|
||||||
| ^^ - -
|
| ^^ - -
|
||||||
|
|
||||||
error[E0107]: this struct takes 2 generic arguments but 0 generic arguments were supplied
|
error[E0107]: struct takes 2 generic arguments but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:40:14
|
--> $DIR/wrong-number-of-args.rs:40:14
|
||||||
|
|
|
|
||||||
LL | type E = Ty<>;
|
LL | type E = Ty<>;
|
||||||
@ -317,7 +317,7 @@ help: add missing generic argument
|
|||||||
LL | type A = Ty<T>;
|
LL | type A = Ty<T>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:54:14
|
--> $DIR/wrong-number-of-args.rs:54:14
|
||||||
|
|
|
|
||||||
LL | type B = Ty<'static>;
|
LL | type B = Ty<'static>;
|
||||||
@ -333,7 +333,7 @@ help: add missing generic argument
|
|||||||
LL | type B = Ty<'static, T>;
|
LL | type B = Ty<'static, T>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:64:14
|
--> $DIR/wrong-number-of-args.rs:64:14
|
||||||
|
|
|
|
||||||
LL | type E = Ty<>;
|
LL | type E = Ty<>;
|
||||||
@ -349,7 +349,7 @@ help: add missing generic argument
|
|||||||
LL | type E = Ty<T>;
|
LL | type E = Ty<T>;
|
||||||
| +
|
| +
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:70:14
|
--> $DIR/wrong-number-of-args.rs:70:14
|
||||||
|
|
|
|
||||||
LL | type F = Ty<'static, usize, 'static, usize>;
|
LL | type F = Ty<'static, usize, 'static, usize>;
|
||||||
@ -363,7 +363,7 @@ note: struct defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | struct Ty<'a, T>;
|
LL | struct Ty<'a, T>;
|
||||||
| ^^ --
|
| ^^ --
|
||||||
|
|
||||||
error[E0107]: this struct takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:70:14
|
--> $DIR/wrong-number-of-args.rs:70:14
|
||||||
|
|
|
|
||||||
LL | type F = Ty<'static, usize, 'static, usize>;
|
LL | type F = Ty<'static, usize, 'static, usize>;
|
||||||
@ -393,7 +393,7 @@ help: add missing generic arguments
|
|||||||
LL | type A = Ty<A, B>;
|
LL | type A = Ty<A, B>;
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
||||||
error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes at least 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:84:14
|
--> $DIR/wrong-number-of-args.rs:84:14
|
||||||
|
|
|
|
||||||
LL | type B = Ty<usize>;
|
LL | type B = Ty<usize>;
|
||||||
@ -411,7 +411,7 @@ help: add missing generic argument
|
|||||||
LL | type B = Ty<usize, B>;
|
LL | type B = Ty<usize, B>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied
|
error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:92:14
|
--> $DIR/wrong-number-of-args.rs:92:14
|
||||||
|
|
|
|
||||||
LL | type E = Ty<usize, String, char, f64>;
|
LL | type E = Ty<usize, String, char, f64>;
|
||||||
@ -425,7 +425,7 @@ note: struct defined here, with at most 3 generic parameters: `A`, `B`, `C`
|
|||||||
LL | struct Ty<A, B, C = &'static str>;
|
LL | struct Ty<A, B, C = &'static str>;
|
||||||
| ^^ - - ----------------
|
| ^^ - - ----------------
|
||||||
|
|
||||||
error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied
|
error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:96:14
|
--> $DIR/wrong-number-of-args.rs:96:14
|
||||||
|
|
|
|
||||||
LL | type F = Ty<>;
|
LL | type F = Ty<>;
|
||||||
@ -441,7 +441,7 @@ help: add missing generic arguments
|
|||||||
LL | type F = Ty<A, B>;
|
LL | type F = Ty<A, B>;
|
||||||
| ++++
|
| ++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:116:22
|
--> $DIR/wrong-number-of-args.rs:116:22
|
||||||
|
|
|
|
||||||
LL | type A = Box<dyn NonGeneric<usize>>;
|
LL | type A = Box<dyn NonGeneric<usize>>;
|
||||||
@ -455,7 +455,7 @@ note: trait defined here, with 0 generic parameters
|
|||||||
LL | trait NonGeneric {
|
LL | trait NonGeneric {
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:125:22
|
--> $DIR/wrong-number-of-args.rs:125:22
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericLifetime<'static, 'static>>;
|
LL | type C = Box<dyn GenericLifetime<'static, 'static>>;
|
||||||
@ -485,7 +485,7 @@ help: add missing generic argument
|
|||||||
LL | type D = Box<dyn GenericType<A>>;
|
LL | type D = Box<dyn GenericType<A>>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:133:22
|
--> $DIR/wrong-number-of-args.rs:133:22
|
||||||
|
|
|
|
||||||
LL | type E = Box<dyn GenericType<String, usize>>;
|
LL | type E = Box<dyn GenericType<String, usize>>;
|
||||||
@ -499,7 +499,7 @@ note: trait defined here, with 1 generic parameter: `A`
|
|||||||
LL | trait GenericType<A> {
|
LL | trait GenericType<A> {
|
||||||
| ^^^^^^^^^^^ -
|
| ^^^^^^^^^^^ -
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:142:22
|
--> $DIR/wrong-number-of-args.rs:142:22
|
||||||
|
|
|
|
||||||
LL | type G = Box<dyn GenericType<>>;
|
LL | type G = Box<dyn GenericType<>>;
|
||||||
@ -515,7 +515,7 @@ help: add missing generic argument
|
|||||||
LL | type G = Box<dyn GenericType<A>>;
|
LL | type G = Box<dyn GenericType<A>>;
|
||||||
| +
|
| +
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:153:26
|
--> $DIR/wrong-number-of-args.rs:153:26
|
||||||
|
|
|
|
||||||
LL | type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
|
LL | type A = Box<dyn NonGenericAT<usize, AssocTy=()>>;
|
||||||
@ -529,7 +529,7 @@ note: trait defined here, with 0 generic parameters
|
|||||||
LL | trait NonGenericAT {
|
LL | trait NonGenericAT {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:168:26
|
--> $DIR/wrong-number-of-args.rs:168:26
|
||||||
|
|
|
|
||||||
LL | type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeAT<'static, 'static, AssocTy=()>>;
|
||||||
@ -543,7 +543,7 @@ note: trait defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | trait GenericLifetimeAT<'a> {
|
LL | trait GenericLifetimeAT<'a> {
|
||||||
| ^^^^^^^^^^^^^^^^^ --
|
| ^^^^^^^^^^^^^^^^^ --
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:172:26
|
--> $DIR/wrong-number-of-args.rs:172:26
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
|
LL | type C = Box<dyn GenericLifetimeAT<(), AssocTy=()>>;
|
||||||
@ -557,7 +557,7 @@ note: trait defined here, with 0 generic parameters
|
|||||||
LL | trait GenericLifetimeAT<'a> {
|
LL | trait GenericLifetimeAT<'a> {
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:185:26
|
--> $DIR/wrong-number-of-args.rs:185:26
|
||||||
|
|
|
|
||||||
LL | type A = Box<dyn GenericTypeAT<AssocTy=()>>;
|
LL | type A = Box<dyn GenericTypeAT<AssocTy=()>>;
|
||||||
@ -573,7 +573,7 @@ help: add missing generic argument
|
|||||||
LL | type A = Box<dyn GenericTypeAT<A, AssocTy=()>>;
|
LL | type A = Box<dyn GenericTypeAT<A, AssocTy=()>>;
|
||||||
| ++
|
| ++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:189:26
|
--> $DIR/wrong-number-of-args.rs:189:26
|
||||||
|
|
|
|
||||||
LL | type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
|
LL | type B = Box<dyn GenericTypeAT<(), (), AssocTy=()>>;
|
||||||
@ -587,7 +587,7 @@ note: trait defined here, with 1 generic parameter: `A`
|
|||||||
LL | trait GenericTypeAT<A> {
|
LL | trait GenericTypeAT<A> {
|
||||||
| ^^^^^^^^^^^^^ -
|
| ^^^^^^^^^^^^^ -
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:193:26
|
--> $DIR/wrong-number-of-args.rs:193:26
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
|
LL | type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
|
||||||
@ -601,7 +601,7 @@ note: trait defined here, with 0 lifetime parameters
|
|||||||
LL | trait GenericTypeAT<A> {
|
LL | trait GenericTypeAT<A> {
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:193:26
|
--> $DIR/wrong-number-of-args.rs:193:26
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
|
LL | type C = Box<dyn GenericTypeAT<'static, AssocTy=()>>;
|
||||||
@ -617,7 +617,7 @@ help: add missing generic argument
|
|||||||
LL | type C = Box<dyn GenericTypeAT<'static, A, AssocTy=()>>;
|
LL | type C = Box<dyn GenericTypeAT<'static, A, AssocTy=()>>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:205:26
|
--> $DIR/wrong-number-of-args.rs:205:26
|
||||||
|
|
|
|
||||||
LL | type A = Box<dyn GenericLifetimeTypeAT<AssocTy=()>>;
|
LL | type A = Box<dyn GenericLifetimeTypeAT<AssocTy=()>>;
|
||||||
@ -633,7 +633,7 @@ help: add missing generic argument
|
|||||||
LL | type A = Box<dyn GenericLifetimeTypeAT<A, AssocTy=()>>;
|
LL | type A = Box<dyn GenericLifetimeTypeAT<A, AssocTy=()>>;
|
||||||
| ++
|
| ++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:212:26
|
--> $DIR/wrong-number-of-args.rs:212:26
|
||||||
|
|
|
|
||||||
LL | type B = Box<dyn GenericLifetimeTypeAT<'static, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeTypeAT<'static, AssocTy=()>>;
|
||||||
@ -649,7 +649,7 @@ help: add missing generic argument
|
|||||||
LL | type B = Box<dyn GenericLifetimeTypeAT<'static, A, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeTypeAT<'static, A, AssocTy=()>>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:216:26
|
--> $DIR/wrong-number-of-args.rs:216:26
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
||||||
@ -663,7 +663,7 @@ note: trait defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^ --
|
| ^^^^^^^^^^^^^^^^^^^^^ --
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:216:26
|
--> $DIR/wrong-number-of-args.rs:216:26
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
||||||
@ -679,7 +679,7 @@ help: add missing generic argument
|
|||||||
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, A, AssocTy=()>>;
|
LL | type C = Box<dyn GenericLifetimeTypeAT<'static, 'static, A, AssocTy=()>>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:227:26
|
--> $DIR/wrong-number-of-args.rs:227:26
|
||||||
|
|
|
|
||||||
LL | type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
|
LL | type E = Box<dyn GenericLifetimeTypeAT<(), (), AssocTy=()>>;
|
||||||
@ -693,7 +693,7 @@ note: trait defined here, with 1 generic parameter: `A`
|
|||||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^ -
|
| ^^^^^^^^^^^^^^^^^^^^^ -
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:234:26
|
--> $DIR/wrong-number-of-args.rs:234:26
|
||||||
|
|
|
|
||||||
LL | type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
|
LL | type F = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), AssocTy=()>>;
|
||||||
@ -707,7 +707,7 @@ note: trait defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^ --
|
| ^^^^^^^^^^^^^^^^^^^^^ --
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:238:26
|
--> $DIR/wrong-number-of-args.rs:238:26
|
||||||
|
|
|
|
||||||
LL | type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
|
LL | type G = Box<dyn GenericLifetimeTypeAT<'static, (), (), AssocTy=()>>;
|
||||||
@ -721,7 +721,7 @@ note: trait defined here, with 1 generic parameter: `A`
|
|||||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^ -
|
| ^^^^^^^^^^^^^^^^^^^^^ -
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: trait takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:242:26
|
--> $DIR/wrong-number-of-args.rs:242:26
|
||||||
|
|
|
|
||||||
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
||||||
@ -735,7 +735,7 @@ note: trait defined here, with 1 lifetime parameter: `'a`
|
|||||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^ --
|
| ^^^^^^^^^^^^^^^^^^^^^ --
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:242:26
|
--> $DIR/wrong-number-of-args.rs:242:26
|
||||||
|
|
|
|
||||||
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
LL | type H = Box<dyn GenericLifetimeTypeAT<'static, 'static, (), (), AssocTy=()>>;
|
||||||
@ -749,7 +749,7 @@ note: trait defined here, with 1 generic parameter: `A`
|
|||||||
LL | trait GenericLifetimeTypeAT<'a, A> {
|
LL | trait GenericLifetimeTypeAT<'a, A> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^ -
|
| ^^^^^^^^^^^^^^^^^^^^^ -
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 generic arguments but 0 generic arguments were supplied
|
error[E0107]: trait takes 2 generic arguments but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:254:26
|
--> $DIR/wrong-number-of-args.rs:254:26
|
||||||
|
|
|
|
||||||
LL | type A = Box<dyn GenericTypeTypeAT<AssocTy=()>>;
|
LL | type A = Box<dyn GenericTypeTypeAT<AssocTy=()>>;
|
||||||
@ -765,7 +765,7 @@ help: add missing generic arguments
|
|||||||
LL | type A = Box<dyn GenericTypeTypeAT<A, B, AssocTy=()>>;
|
LL | type A = Box<dyn GenericTypeTypeAT<A, B, AssocTy=()>>;
|
||||||
| +++++
|
| +++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: trait takes 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:258:26
|
--> $DIR/wrong-number-of-args.rs:258:26
|
||||||
|
|
|
|
||||||
LL | type B = Box<dyn GenericTypeTypeAT<(), AssocTy=()>>;
|
LL | type B = Box<dyn GenericTypeTypeAT<(), AssocTy=()>>;
|
||||||
@ -783,7 +783,7 @@ help: add missing generic argument
|
|||||||
LL | type B = Box<dyn GenericTypeTypeAT<(), B, AssocTy=()>>;
|
LL | type B = Box<dyn GenericTypeTypeAT<(), B, AssocTy=()>>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 generic arguments but 3 generic arguments were supplied
|
error[E0107]: trait takes 2 generic arguments but 3 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:262:26
|
--> $DIR/wrong-number-of-args.rs:262:26
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
|
LL | type C = Box<dyn GenericTypeTypeAT<(), (), (), AssocTy=()>>;
|
||||||
@ -797,7 +797,7 @@ note: trait defined here, with 2 generic parameters: `A`, `B`
|
|||||||
LL | trait GenericTypeTypeAT<A, B> {
|
LL | trait GenericTypeTypeAT<A, B> {
|
||||||
| ^^^^^^^^^^^^^^^^^ - -
|
| ^^^^^^^^^^^^^^^^^ - -
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:277:26
|
--> $DIR/wrong-number-of-args.rs:277:26
|
||||||
|
|
|
|
||||||
LL | type B = Box<dyn GenericLifetimeLifetimeAT<'static, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeLifetimeAT<'static, AssocTy=()>>;
|
||||||
@ -815,7 +815,7 @@ help: add missing lifetime argument
|
|||||||
LL | type B = Box<dyn GenericLifetimeLifetimeAT<'static, 'static, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeLifetimeAT<'static, 'static, AssocTy=()>>;
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:287:26
|
--> $DIR/wrong-number-of-args.rs:287:26
|
||||||
|
|
|
|
||||||
LL | type A = Box<dyn GenericLifetimeLifetimeTypeAT<AssocTy=()>>;
|
LL | type A = Box<dyn GenericLifetimeLifetimeTypeAT<AssocTy=()>>;
|
||||||
@ -831,7 +831,7 @@ help: add missing generic argument
|
|||||||
LL | type A = Box<dyn GenericLifetimeLifetimeTypeAT<A, AssocTy=()>>;
|
LL | type A = Box<dyn GenericLifetimeLifetimeTypeAT<A, AssocTy=()>>;
|
||||||
| ++
|
| ++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:294:26
|
--> $DIR/wrong-number-of-args.rs:294:26
|
||||||
|
|
|
|
||||||
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, AssocTy=()>>;
|
||||||
@ -849,7 +849,7 @@ help: add missing lifetime argument
|
|||||||
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, 'static, AssocTy=()>>;
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 1 generic argument but 0 generic arguments were supplied
|
error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:294:26
|
--> $DIR/wrong-number-of-args.rs:294:26
|
||||||
|
|
|
|
||||||
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, AssocTy=()>>;
|
||||||
@ -865,7 +865,7 @@ help: add missing generic argument
|
|||||||
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, A, AssocTy=()>>;
|
LL | type B = Box<dyn GenericLifetimeLifetimeTypeAT<'static, A, AssocTy=()>>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:300:26
|
--> $DIR/wrong-number-of-args.rs:300:26
|
||||||
|
|
|
|
||||||
LL | type C = Box<dyn GenericLifetimeLifetimeTypeAT<'static, (), AssocTy=()>>;
|
LL | type C = Box<dyn GenericLifetimeLifetimeTypeAT<'static, (), AssocTy=()>>;
|
||||||
@ -894,7 +894,7 @@ help: add missing generic arguments
|
|||||||
LL | type A = HashMap<K, V>;
|
LL | type A = HashMap<K, V>;
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
||||||
error[E0107]: this struct takes at least 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes at least 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:314:18
|
--> $DIR/wrong-number-of-args.rs:314:18
|
||||||
|
|
|
|
||||||
LL | type B = HashMap<String>;
|
LL | type B = HashMap<String>;
|
||||||
@ -907,7 +907,7 @@ help: add missing generic argument
|
|||||||
LL | type B = HashMap<String, V>;
|
LL | type B = HashMap<String, V>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:318:18
|
--> $DIR/wrong-number-of-args.rs:318:18
|
||||||
|
|
|
|
||||||
LL | type C = HashMap<'static>;
|
LL | type C = HashMap<'static>;
|
||||||
@ -915,7 +915,7 @@ LL | type C = HashMap<'static>;
|
|||||||
| |
|
| |
|
||||||
| expected 0 lifetime arguments
|
| expected 0 lifetime arguments
|
||||||
|
|
||||||
error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied
|
error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:318:18
|
--> $DIR/wrong-number-of-args.rs:318:18
|
||||||
|
|
|
|
||||||
LL | type C = HashMap<'static>;
|
LL | type C = HashMap<'static>;
|
||||||
@ -926,7 +926,7 @@ help: add missing generic arguments
|
|||||||
LL | type C = HashMap<'static, K, V>;
|
LL | type C = HashMap<'static, K, V>;
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
||||||
error[E0107]: this struct takes at most 3 generic arguments but 4 generic arguments were supplied
|
error[E0107]: struct takes at most 3 generic arguments but 4 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:324:18
|
--> $DIR/wrong-number-of-args.rs:324:18
|
||||||
|
|
|
|
||||||
LL | type D = HashMap<usize, String, char, f64>;
|
LL | type D = HashMap<usize, String, char, f64>;
|
||||||
@ -934,7 +934,7 @@ LL | type D = HashMap<usize, String, char, f64>;
|
|||||||
| |
|
| |
|
||||||
| expected at most 3 generic arguments
|
| expected at most 3 generic arguments
|
||||||
|
|
||||||
error[E0107]: this struct takes at least 2 generic arguments but 0 generic arguments were supplied
|
error[E0107]: struct takes at least 2 generic arguments but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:328:18
|
--> $DIR/wrong-number-of-args.rs:328:18
|
||||||
|
|
|
|
||||||
LL | type E = HashMap<>;
|
LL | type E = HashMap<>;
|
||||||
@ -956,7 +956,7 @@ help: add missing generic arguments
|
|||||||
LL | type A = Result<T, E>;
|
LL | type A = Result<T, E>;
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
||||||
error[E0107]: this enum takes 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:338:18
|
--> $DIR/wrong-number-of-args.rs:338:18
|
||||||
|
|
|
|
||||||
LL | type B = Result<String>;
|
LL | type B = Result<String>;
|
||||||
@ -969,7 +969,7 @@ help: add missing generic argument
|
|||||||
LL | type B = Result<String, E>;
|
LL | type B = Result<String, E>;
|
||||||
| +++
|
| +++
|
||||||
|
|
||||||
error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: enum takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:342:18
|
--> $DIR/wrong-number-of-args.rs:342:18
|
||||||
|
|
|
|
||||||
LL | type C = Result<'static>;
|
LL | type C = Result<'static>;
|
||||||
@ -977,7 +977,7 @@ LL | type C = Result<'static>;
|
|||||||
| |
|
| |
|
||||||
| expected 0 lifetime arguments
|
| expected 0 lifetime arguments
|
||||||
|
|
||||||
error[E0107]: this enum takes 2 generic arguments but 0 generic arguments were supplied
|
error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:342:18
|
--> $DIR/wrong-number-of-args.rs:342:18
|
||||||
|
|
|
|
||||||
LL | type C = Result<'static>;
|
LL | type C = Result<'static>;
|
||||||
@ -988,7 +988,7 @@ help: add missing generic arguments
|
|||||||
LL | type C = Result<'static, T, E>;
|
LL | type C = Result<'static, T, E>;
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
||||||
error[E0107]: this enum takes 2 generic arguments but 3 generic arguments were supplied
|
error[E0107]: enum takes 2 generic arguments but 3 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:348:18
|
--> $DIR/wrong-number-of-args.rs:348:18
|
||||||
|
|
|
|
||||||
LL | type D = Result<usize, String, char>;
|
LL | type D = Result<usize, String, char>;
|
||||||
@ -996,7 +996,7 @@ LL | type D = Result<usize, String, char>;
|
|||||||
| |
|
| |
|
||||||
| expected 2 generic arguments
|
| expected 2 generic arguments
|
||||||
|
|
||||||
error[E0107]: this enum takes 2 generic arguments but 0 generic arguments were supplied
|
error[E0107]: enum takes 2 generic arguments but 0 generic arguments were supplied
|
||||||
--> $DIR/wrong-number-of-args.rs:352:18
|
--> $DIR/wrong-number-of-args.rs:352:18
|
||||||
|
|
|
|
||||||
LL | type E = Result<>;
|
LL | type E = Result<>;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this function takes 1 generic argument but 2 generic arguments were supplied
|
error[E0107]: function takes 1 generic argument but 2 generic arguments were supplied
|
||||||
--> $DIR/explicit-generic-args-for-impl.rs:4:5
|
--> $DIR/explicit-generic-args-for-impl.rs:4:5
|
||||||
|
|
|
|
||||||
LL | foo::<str, String>("".to_string());
|
LL | foo::<str, String>("".to_string());
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
|
error[E0107]: function takes 2 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/not-enough-args.rs:4:5
|
--> $DIR/not-enough-args.rs:4:5
|
||||||
|
|
|
|
||||||
LL | f::<[u8]>("a", b"a");
|
LL | f::<[u8]>("a", b"a");
|
||||||
|
19
tests/ui/issues/issue-106755.rs
Normal file
19
tests/ui/issues/issue-106755.rs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// compile-flags:-Ztranslate-lang=en_US
|
||||||
|
|
||||||
|
#![feature(negative_impls)]
|
||||||
|
#![feature(marker_trait_attr)]
|
||||||
|
|
||||||
|
#[marker]
|
||||||
|
trait MyTrait {}
|
||||||
|
|
||||||
|
struct TestType<T>(::std::marker::PhantomData<T>);
|
||||||
|
|
||||||
|
unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
|
||||||
|
|
||||||
|
impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation
|
||||||
|
|
||||||
|
unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
|
||||||
|
|
||||||
|
impl !Send for TestType<i32> {}
|
||||||
|
|
||||||
|
fn main() {}
|
22
tests/ui/issues/issue-106755.stderr
Normal file
22
tests/ui/issues/issue-106755.stderr
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`:
|
||||||
|
--> $DIR/issue-106755.rs:13:1
|
||||||
|
|
|
||||||
|
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
|
||||||
|
| ------------------------------------------------------ positive implementation here
|
||||||
|
LL |
|
||||||
|
LL | impl<T: MyTrait> !Send for TestType<T> {}
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here
|
||||||
|
|
||||||
|
error[E0119]: conflicting implementations of trait `Send` for type `TestType<_>`
|
||||||
|
--> $DIR/issue-106755.rs:15:1
|
||||||
|
|
|
||||||
|
LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
|
||||||
|
| ------------------------------------------------------ first implementation here
|
||||||
|
...
|
||||||
|
LL | unsafe impl<T: 'static> Send for TestType<T> {}
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>`
|
||||||
|
|
||||||
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
Some errors have detailed explanations: E0119, E0751.
|
||||||
|
For more information about an error, try `rustc --explain E0119`.
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
struct Foo<'a> {
|
struct Foo<'a> {
|
||||||
x: Box<'a, isize>
|
x: Box<'a, isize>
|
||||||
//~^ ERROR this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/issue-18423.rs:4:8
|
--> $DIR/issue-18423.rs:4:8
|
||||||
|
|
|
|
||||||
LL | x: Box<'a, isize>
|
LL | x: Box<'a, isize>
|
||||||
|
@ -4,7 +4,7 @@ fn foo<T>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Drop for Foo<T> {
|
impl<T> Drop for Foo<T> {
|
||||||
//~^ ERROR this struct takes 0 generic arguments but 1 generic argument
|
//~^ ERROR struct takes 0 generic arguments but 1 generic argument
|
||||||
fn drop(&mut self) {}
|
fn drop(&mut self) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ LL | struct Foo {
|
|||||||
LL | x: T,
|
LL | x: T,
|
||||||
| ^ use of generic parameter from outer function
|
| ^ use of generic parameter from outer function
|
||||||
|
|
||||||
error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: struct takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-3214.rs:6:22
|
--> $DIR/issue-3214.rs:6:22
|
||||||
|
|
|
|
||||||
LL | impl<T> Drop for Foo<T> {
|
LL | impl<T> Drop for Foo<T> {
|
||||||
|
@ -9,8 +9,8 @@ macro_rules! impl_add {
|
|||||||
$(
|
$(
|
||||||
fn $n() {
|
fn $n() {
|
||||||
S::f::<i64>();
|
S::f::<i64>();
|
||||||
//~^ ERROR this associated function takes 0 generic
|
//~^ ERROR associated function takes 0 generic
|
||||||
//~| ERROR this associated function takes 0 generic
|
//~| ERROR associated function takes 0 generic
|
||||||
}
|
}
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-53251.rs:11:20
|
--> $DIR/issue-53251.rs:11:20
|
||||||
|
|
|
|
||||||
LL | S::f::<i64>();
|
LL | S::f::<i64>();
|
||||||
@ -16,7 +16,7 @@ LL | fn f() {}
|
|||||||
| ^
|
| ^
|
||||||
= note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-53251.rs:11:20
|
--> $DIR/issue-53251.rs:11:20
|
||||||
|
|
|
|
||||||
LL | S::f::<i64>();
|
LL | S::f::<i64>();
|
||||||
|
@ -9,7 +9,7 @@ impl Borked {
|
|||||||
fn run_wild<T>(b: &Borked) {
|
fn run_wild<T>(b: &Borked) {
|
||||||
b.a::<'_, T>();
|
b.a::<'_, T>();
|
||||||
//~^ ERROR cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
//~^ ERROR cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
||||||
//~| ERROR this method takes 0 generic arguments but 1 generic argument
|
//~| ERROR method takes 0 generic arguments but 1 generic argument
|
||||||
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ LL | #![deny(warnings)]
|
|||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
= note: `#[deny(late_bound_lifetime_arguments)]` implied by `#[deny(warnings)]`
|
= note: `#[deny(late_bound_lifetime_arguments)]` implied by `#[deny(warnings)]`
|
||||||
|
|
||||||
error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-60622.rs:10:7
|
--> $DIR/issue-60622.rs:10:7
|
||||||
|
|
|
|
||||||
LL | b.a::<'_, T>();
|
LL | b.a::<'_, T>();
|
||||||
|
@ -7,6 +7,6 @@ trait Trait<'a> {
|
|||||||
type Alias<'a, T> = <T as Trait<'a>>::Assoc;
|
type Alias<'a, T> = <T as Trait<'a>>::Assoc;
|
||||||
|
|
||||||
fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
|
fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
|
||||||
//~^ error: this type alias takes 1 lifetime argument but 2 lifetime arguments were supplied
|
//~^ error: type alias takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this type alias takes 1 lifetime argument but 2 lifetime arguments were supplied
|
error[E0107]: type alias takes 1 lifetime argument but 2 lifetime arguments were supplied
|
||||||
--> $DIR/mismatched_arg_count.rs:9:29
|
--> $DIR/mismatched_arg_count.rs:9:29
|
||||||
|
|
|
|
||||||
LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
|
LL | fn bar<'a, T: Trait<'a>>(_: Alias<'a, 'a, T>) {}
|
||||||
|
@ -14,9 +14,9 @@ impl S {
|
|||||||
fn method_call() {
|
fn method_call() {
|
||||||
S.early(); // OK
|
S.early(); // OK
|
||||||
S.early::<'static>();
|
S.early::<'static>();
|
||||||
//~^ ERROR this method takes 2 lifetime arguments but 1 lifetime argument
|
//~^ ERROR method takes 2 lifetime arguments but 1 lifetime argument
|
||||||
S.early::<'static, 'static, 'static>();
|
S.early::<'static, 'static, 'static>();
|
||||||
//~^ ERROR this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
//~^ ERROR method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
||||||
let _: &u8 = S.life_and_type::<'static>();
|
let _: &u8 = S.life_and_type::<'static>();
|
||||||
S.life_and_type::<u8>();
|
S.life_and_type::<u8>();
|
||||||
S.life_and_type::<'static, u8>();
|
S.life_and_type::<'static, u8>();
|
||||||
@ -61,9 +61,9 @@ fn ufcs() {
|
|||||||
|
|
||||||
S::early(S); // OK
|
S::early(S); // OK
|
||||||
S::early::<'static>(S);
|
S::early::<'static>(S);
|
||||||
//~^ ERROR this method takes 2 lifetime arguments but 1 lifetime argument
|
//~^ ERROR method takes 2 lifetime arguments but 1 lifetime argument
|
||||||
S::early::<'static, 'static, 'static>(S);
|
S::early::<'static, 'static, 'static>(S);
|
||||||
//~^ ERROR this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
//~^ ERROR method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
||||||
let _: &u8 = S::life_and_type::<'static>(S);
|
let _: &u8 = S::life_and_type::<'static>(S);
|
||||||
S::life_and_type::<u8>(S);
|
S::life_and_type::<u8>(S);
|
||||||
S::life_and_type::<'static, u8>(S);
|
S::life_and_type::<'static, u8>(S);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this method takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: method takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/method-call-lifetime-args-fail.rs:16:7
|
--> $DIR/method-call-lifetime-args-fail.rs:16:7
|
||||||
|
|
|
|
||||||
LL | S.early::<'static>();
|
LL | S.early::<'static>();
|
||||||
@ -16,7 +16,7 @@ help: add missing lifetime argument
|
|||||||
LL | S.early::<'static, 'static>();
|
LL | S.early::<'static, 'static>();
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
||||||
--> $DIR/method-call-lifetime-args-fail.rs:18:7
|
--> $DIR/method-call-lifetime-args-fail.rs:18:7
|
||||||
|
|
|
|
||||||
LL | S.early::<'static, 'static, 'static>();
|
LL | S.early::<'static, 'static, 'static>();
|
||||||
@ -198,7 +198,7 @@ note: the late bound lifetime parameter is introduced here
|
|||||||
LL | fn late_unused_early<'a, 'b>(self) -> &'b u8 { loop {} }
|
LL | fn late_unused_early<'a, 'b>(self) -> &'b u8 { loop {} }
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error[E0107]: this method takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: method takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/method-call-lifetime-args-fail.rs:63:8
|
--> $DIR/method-call-lifetime-args-fail.rs:63:8
|
||||||
|
|
|
|
||||||
LL | S::early::<'static>(S);
|
LL | S::early::<'static>(S);
|
||||||
@ -216,7 +216,7 @@ help: add missing lifetime argument
|
|||||||
LL | S::early::<'static, 'static>(S);
|
LL | S::early::<'static, 'static>(S);
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
error[E0107]: method takes 2 lifetime arguments but 3 lifetime arguments were supplied
|
||||||
--> $DIR/method-call-lifetime-args-fail.rs:65:8
|
--> $DIR/method-call-lifetime-args-fail.rs:65:8
|
||||||
|
|
|
|
||||||
LL | S::early::<'static, 'static, 'static>(S);
|
LL | S::early::<'static, 'static, 'static>(S);
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
// check-pass
|
||||||
|
#![feature(const_trait_impl, rustc_attrs)]
|
||||||
|
|
||||||
|
#[const_trait]
|
||||||
|
trait Foo {
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
|
fn into_iter(&self) { println!("FEAR ME!") }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
impl const Foo for () {
|
||||||
|
fn into_iter(&self) {
|
||||||
|
// ^_^
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const _: () = Foo::into_iter(&());
|
||||||
|
|
||||||
|
fn main() {}
|
18
tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs
Normal file
18
tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
// check-pass
|
||||||
|
#![feature(const_trait_impl, rustc_attrs)]
|
||||||
|
|
||||||
|
#[const_trait]
|
||||||
|
trait IntoIter {
|
||||||
|
fn into_iter(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[const_trait]
|
||||||
|
trait Hmm: Sized {
|
||||||
|
#[rustc_do_not_const_check]
|
||||||
|
fn chain<U>(self, other: U) where U: IntoIter,
|
||||||
|
{
|
||||||
|
other.into_iter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
@ -2,12 +2,12 @@ fn main() {
|
|||||||
trait Seq { }
|
trait Seq { }
|
||||||
|
|
||||||
impl<T> Seq<T> for Vec<T> {
|
impl<T> Seq<T> for Vec<T> {
|
||||||
//~^ ERROR this trait takes 0 generic arguments but 1 generic argument
|
//~^ ERROR trait takes 0 generic arguments but 1 generic argument
|
||||||
/* ... */
|
/* ... */
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Seq<bool> for u32 {
|
impl Seq<bool> for u32 {
|
||||||
//~^ ERROR this trait takes 0 generic arguments but 1 generic argument
|
//~^ ERROR trait takes 0 generic arguments but 1 generic argument
|
||||||
/* Treat the integer as a sequence of bits */
|
/* Treat the integer as a sequence of bits */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/seq-args.rs:4:13
|
--> $DIR/seq-args.rs:4:13
|
||||||
|
|
|
|
||||||
LL | impl<T> Seq<T> for Vec<T> {
|
LL | impl<T> Seq<T> for Vec<T> {
|
||||||
@ -12,7 +12,7 @@ note: trait defined here, with 0 generic parameters
|
|||||||
LL | trait Seq { }
|
LL | trait Seq { }
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/seq-args.rs:9:10
|
--> $DIR/seq-args.rs:9:10
|
||||||
|
|
|
|
||||||
LL | impl Seq<bool> for u32 {
|
LL | impl Seq<bool> for u32 {
|
||||||
|
@ -13,7 +13,7 @@ fn f<T: Tr>() {
|
|||||||
//~^ ERROR expected struct, variant or union type, found associated type
|
//~^ ERROR expected struct, variant or union type, found associated type
|
||||||
let z = T::A::<u8> {};
|
let z = T::A::<u8> {};
|
||||||
//~^ ERROR expected struct, variant or union type, found associated type
|
//~^ ERROR expected struct, variant or union type, found associated type
|
||||||
//~| ERROR this associated type takes 0 generic arguments but 1 generic argument was supplied
|
//~| ERROR associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||||
match S {
|
match S {
|
||||||
T::A {} => {}
|
T::A {} => {}
|
||||||
//~^ ERROR expected struct, variant or union type, found associated type
|
//~^ ERROR expected struct, variant or union type, found associated type
|
||||||
@ -22,7 +22,7 @@ fn f<T: Tr>() {
|
|||||||
|
|
||||||
fn g<T: Tr<A = S>>() {
|
fn g<T: Tr<A = S>>() {
|
||||||
let s = T::A {}; // OK
|
let s = T::A {}; // OK
|
||||||
let z = T::A::<u8> {}; //~ ERROR this associated type takes 0 generic arguments but 1 generic argument was supplied
|
let z = T::A::<u8> {}; //~ ERROR associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||||
match S {
|
match S {
|
||||||
T::A {} => {} // OK
|
T::A {} => {} // OK
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ error[E0071]: expected struct, variant or union type, found associated type
|
|||||||
LL | let s = T::A {};
|
LL | let s = T::A {};
|
||||||
| ^^^^ not a struct
|
| ^^^^ not a struct
|
||||||
|
|
||||||
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/struct-path-associated-type.rs:14:16
|
--> $DIR/struct-path-associated-type.rs:14:16
|
||||||
|
|
|
|
||||||
LL | let z = T::A::<u8> {};
|
LL | let z = T::A::<u8> {};
|
||||||
@ -30,7 +30,7 @@ error[E0071]: expected struct, variant or union type, found associated type
|
|||||||
LL | T::A {} => {}
|
LL | T::A {} => {}
|
||||||
| ^^^^ not a struct
|
| ^^^^ not a struct
|
||||||
|
|
||||||
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/struct-path-associated-type.rs:25:16
|
--> $DIR/struct-path-associated-type.rs:25:16
|
||||||
|
|
|
|
||||||
LL | let z = T::A::<u8> {};
|
LL | let z = T::A::<u8> {};
|
||||||
|
@ -45,13 +45,13 @@ fn main() {
|
|||||||
y: 8,
|
y: 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
let pt3 = PointF::<i32> { //~ ERROR this type alias takes 0 generic arguments but 1 generic argument
|
let pt3 = PointF::<i32> { //~ ERROR type alias takes 0 generic arguments but 1 generic argument
|
||||||
x: 9, //~ ERROR mismatched types
|
x: 9, //~ ERROR mismatched types
|
||||||
y: 10, //~ ERROR mismatched types
|
y: 10, //~ ERROR mismatched types
|
||||||
};
|
};
|
||||||
|
|
||||||
match (Point { x: 1, y: 2 }) {
|
match (Point { x: 1, y: 2 }) {
|
||||||
PointF::<u32> { .. } => {} //~ ERROR this type alias takes 0 generic arguments but 1 generic argument
|
PointF::<u32> { .. } => {} //~ ERROR type alias takes 0 generic arguments but 1 generic argument
|
||||||
//~^ ERROR mismatched types
|
//~^ ERROR mismatched types
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ LL | x: 7,
|
|||||||
| expected `f32`, found integer
|
| expected `f32`, found integer
|
||||||
| help: use a float literal: `7.0`
|
| help: use a float literal: `7.0`
|
||||||
|
|
||||||
error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/structure-constructor-type-mismatch.rs:48:15
|
--> $DIR/structure-constructor-type-mismatch.rs:48:15
|
||||||
|
|
|
|
||||||
LL | let pt3 = PointF::<i32> {
|
LL | let pt3 = PointF::<i32> {
|
||||||
@ -84,7 +84,7 @@ LL | y: 10,
|
|||||||
| expected `f32`, found integer
|
| expected `f32`, found integer
|
||||||
| help: use a float literal: `10.0`
|
| help: use a float literal: `10.0`
|
||||||
|
|
||||||
error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/structure-constructor-type-mismatch.rs:54:9
|
--> $DIR/structure-constructor-type-mismatch.rs:54:9
|
||||||
|
|
|
|
||||||
LL | PointF::<u32> { .. } => {}
|
LL | PointF::<u32> { .. } => {}
|
||||||
|
@ -8,5 +8,5 @@ impl Ice for () {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
().f::<()>(());
|
().f::<()>(());
|
||||||
//~^ ERROR this method takes 0 generic arguments but 1 generic argument was supplied
|
//~^ ERROR method takes 0 generic arguments but 1 generic argument was supplied
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-101421.rs:10:8
|
--> $DIR/issue-101421.rs:10:8
|
||||||
|
|
|
|
||||||
LL | ().f::<()>(());
|
LL | ().f::<()>(());
|
||||||
|
@ -8,6 +8,6 @@ impl S {
|
|||||||
fn main() {
|
fn main() {
|
||||||
let x = S;
|
let x = S;
|
||||||
foo::<()>(x);
|
foo::<()>(x);
|
||||||
//~^ ERROR this method takes 0 generic arguments but 1 generic argument was supplied
|
//~^ ERROR method takes 0 generic arguments but 1 generic argument was supplied
|
||||||
//~| ERROR cannot find function `foo` in this scope
|
//~| ERROR cannot find function `foo` in this scope
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-104287.rs:10:5
|
--> $DIR/issue-104287.rs:10:5
|
||||||
|
|
|
|
||||||
LL | foo::<()>(x);
|
LL | foo::<()>(x);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
trait Foo {
|
trait Foo {
|
||||||
type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
|
type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
|
||||||
//~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
//~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||||
//~| ERROR associated type bindings are not allowed here
|
//~| ERROR associated type bindings are not allowed here
|
||||||
//~| HELP add missing
|
//~| HELP add missing
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||||
--> $DIR/issue-85347.rs:3:42
|
--> $DIR/issue-85347.rs:3:42
|
||||||
|
|
|
|
||||||
LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
|
LL | type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-89064.rs:17:16
|
--> $DIR/issue-89064.rs:17:16
|
||||||
|
|
|
|
||||||
LL | let _ = A::foo::<S>();
|
LL | let _ = A::foo::<S>();
|
||||||
@ -20,7 +20,7 @@ LL - let _ = A::foo::<S>();
|
|||||||
LL + let _ = A::foo();
|
LL + let _ = A::foo();
|
||||||
|
|
|
|
||||||
|
|
||||||
error[E0107]: this associated function takes 0 generic arguments but 2 generic arguments were supplied
|
error[E0107]: associated function takes 0 generic arguments but 2 generic arguments were supplied
|
||||||
--> $DIR/issue-89064.rs:22:16
|
--> $DIR/issue-89064.rs:22:16
|
||||||
|
|
|
|
||||||
LL | let _ = B::bar::<S, S>();
|
LL | let _ = B::bar::<S, S>();
|
||||||
@ -42,7 +42,7 @@ LL - let _ = B::bar::<S, S>();
|
|||||||
LL + let _ = B::bar();
|
LL + let _ = B::bar();
|
||||||
|
|
|
|
||||||
|
|
||||||
error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: associated function takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-89064.rs:27:21
|
--> $DIR/issue-89064.rs:27:21
|
||||||
|
|
|
|
||||||
LL | let _ = A::<S>::foo::<S>();
|
LL | let _ = A::<S>::foo::<S>();
|
||||||
@ -56,7 +56,7 @@ note: associated function defined here, with 0 generic parameters
|
|||||||
LL | fn foo() {}
|
LL | fn foo() {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied
|
error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
|
||||||
--> $DIR/issue-89064.rs:31:16
|
--> $DIR/issue-89064.rs:31:16
|
||||||
|
|
|
|
||||||
LL | let _ = 42.into::<Option<_>>();
|
LL | let _ = 42.into::<Option<_>>();
|
||||||
|
@ -37,19 +37,19 @@ thread_local! {
|
|||||||
|
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
//~^ ERROR this union takes 2 lifetime arguments but 1 lifetime argument
|
//~^ ERROR union takes 2 lifetime arguments but 1 lifetime argument
|
||||||
//~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
}
|
}
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
//~^ ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~^ ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
//~| ERROR trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
//~| ERROR missing lifetime
|
//~| ERROR missing lifetime
|
||||||
//~| ERROR missing lifetime
|
//~| ERROR missing lifetime
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `init`'s 3 lifetimes it is borrowed from
|
||||||
|
|
||||||
error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:39:44
|
--> $DIR/missing-lifetime-specifier.rs:39:44
|
||||||
|
|
|
|
||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -151,7 +151,7 @@ help: add missing lifetime argument
|
|||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:39:44
|
--> $DIR/missing-lifetime-specifier.rs:39:44
|
||||||
|
|
|
|
||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -169,7 +169,7 @@ help: add missing lifetime argument
|
|||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:39:44
|
--> $DIR/missing-lifetime-specifier.rs:39:44
|
||||||
|
|
|
|
||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -187,7 +187,7 @@ help: add missing lifetime argument
|
|||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:39:44
|
--> $DIR/missing-lifetime-specifier.rs:39:44
|
||||||
|
|
|
|
||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -205,7 +205,7 @@ help: add missing lifetime argument
|
|||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:39:44
|
--> $DIR/missing-lifetime-specifier.rs:39:44
|
||||||
|
|
|
|
||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -223,7 +223,7 @@ help: add missing lifetime argument
|
|||||||
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:47:45
|
--> $DIR/missing-lifetime-specifier.rs:47:45
|
||||||
|
|
|
|
||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -241,7 +241,7 @@ help: add missing lifetime argument
|
|||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:47:45
|
--> $DIR/missing-lifetime-specifier.rs:47:45
|
||||||
|
|
|
|
||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -259,7 +259,7 @@ help: add missing lifetime argument
|
|||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:47:45
|
--> $DIR/missing-lifetime-specifier.rs:47:45
|
||||||
|
|
|
|
||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -277,7 +277,7 @@ help: add missing lifetime argument
|
|||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:47:45
|
--> $DIR/missing-lifetime-specifier.rs:47:45
|
||||||
|
|
|
|
||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
@ -295,7 +295,7 @@ help: add missing lifetime argument
|
|||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
| +++++++++
|
| +++++++++
|
||||||
|
|
||||||
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||||
--> $DIR/missing-lifetime-specifier.rs:47:45
|
--> $DIR/missing-lifetime-specifier.rs:47:45
|
||||||
|
|
|
|
||||||
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user