diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-03-19 23:13:43 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-03-19 23:13:43 +0000 |
commit | 0e2bde5d6e3118d83004f4b3dfbbe84e5fa2af24 (patch) | |
tree | a559c2c5f783d4cbd605578eee27269d1e3c533b /syntax/report.rs | |
parent | 492f5599cede28b05ef82a747b3bd40191a1ad18 (diff) | |
parent | 15cbbff88df7a8191d88c7aebefc7b508bd4de69 (diff) | |
download | cxx-0e2bde5d6e3118d83004f4b3dfbbe84e5fa2af24.tar.gz |
Snap for 11598262 from 15cbbff88df7a8191d88c7aebefc7b508bd4de69 to sdk-release
Change-Id: I8cafa361ef2d36f3e522dff31060f3796c6fa4ee
Diffstat (limited to 'syntax/report.rs')
-rw-r--r-- | syntax/report.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/syntax/report.rs b/syntax/report.rs index d1d8bc9b..1997182a 100644 --- a/syntax/report.rs +++ b/syntax/report.rs @@ -2,24 +2,24 @@ use quote::ToTokens; use std::fmt::Display; use syn::{Error, Result}; -pub struct Errors { +pub(crate) struct Errors { errors: Vec<Error>, } impl Errors { - pub fn new() -> Self { + pub(crate) fn new() -> Self { Errors { errors: Vec::new() } } - pub fn error(&mut self, sp: impl ToTokens, msg: impl Display) { + pub(crate) fn error(&mut self, sp: impl ToTokens, msg: impl Display) { self.errors.push(Error::new_spanned(sp, msg)); } - pub fn push(&mut self, error: Error) { + pub(crate) fn push(&mut self, error: Error) { self.errors.push(error); } - pub fn propagate(&mut self) -> Result<()> { + pub(crate) fn propagate(&mut self) -> Result<()> { let mut iter = self.errors.drain(..); let mut all_errors = match iter.next() { Some(err) => err, |